Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import sys
|
|
| 5 |
import os
|
| 6 |
import datetime
|
| 7 |
import huggingface_hub
|
| 8 |
-
from huggingface_hub import Repository,
|
| 9 |
from datetime import datetime
|
| 10 |
import csv
|
| 11 |
|
|
@@ -19,7 +19,7 @@ DATA_FILE = os.path.join("data", DATA_FILENAME)
|
|
| 19 |
INDEX_FILE = os.path.join("data", INDEX_FILENAME)
|
| 20 |
|
| 21 |
#this will be called later to upload the chat history back to the dataset
|
| 22 |
-
api=
|
| 23 |
|
| 24 |
# we need a HF access token - read I think suffices becuase we are cloning the distant repo to local space repo.
|
| 25 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
|
|
|
| 5 |
import os
|
| 6 |
import datetime
|
| 7 |
import huggingface_hub
|
| 8 |
+
from huggingface_hub import Repository, HfApi
|
| 9 |
from datetime import datetime
|
| 10 |
import csv
|
| 11 |
|
|
|
|
| 19 |
INDEX_FILE = os.path.join("data", INDEX_FILENAME)
|
| 20 |
|
| 21 |
#this will be called later to upload the chat history back to the dataset
|
| 22 |
+
api=HfApi()
|
| 23 |
|
| 24 |
# we need a HF access token - read I think suffices becuase we are cloning the distant repo to local space repo.
|
| 25 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|