Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,11 @@ HF_TOKEN = os.getenv("HF_TOKEN")
|
|
14 |
assert HF_TOKEN is not None, "You need to set HF_TOKEN in your environment variables"
|
15 |
|
16 |
BASE_DATASETS_SERVER_URL = "https://datasets-server.huggingface.co"
|
|
|
|
|
|
|
|
|
|
|
17 |
client = Client(headers=headers)
|
18 |
api = HfApi(token=HF_TOKEN)
|
19 |
pipe = pipeline("text-generation", model="motherduckdb/DuckDB-NSQL-7B-v0.1", device=1)
|
|
|
14 |
assert HF_TOKEN is not None, "You need to set HF_TOKEN in your environment variables"
|
15 |
|
16 |
BASE_DATASETS_SERVER_URL = "https://datasets-server.huggingface.co"
|
17 |
+
headers = {
|
18 |
+
"Accept" : "application/json",
|
19 |
+
"Authorization": f"Bearer {HF_TOKEN}",
|
20 |
+
"Content-Type": "application/json"
|
21 |
+
}
|
22 |
client = Client(headers=headers)
|
23 |
api = HfApi(token=HF_TOKEN)
|
24 |
pipe = pipeline("text-generation", model="motherduckdb/DuckDB-NSQL-7B-v0.1", device=1)
|