Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1199,6 +1199,10 @@ def handle_large_dataset(df, create_document,isDataFrame):
|
|
1199 |
# Upload file to the Hugging Face Hub
|
1200 |
repo_id = "Redmind/NewageNXTGPT"
|
1201 |
#file_path = "/app/example.txt" # Path to the file to upload
|
|
|
|
|
|
|
|
|
1202 |
from huggingface_hub import HfApi
|
1203 |
api = HfApi()
|
1204 |
api.upload_file(path_or_fileobj=file_path, repo_id=repo_id, repo_type= "space", path_in_repo="output/output.xlsx")
|
|
|
1199 |
# Upload file to the Hugging Face Hub
|
1200 |
repo_id = "Redmind/NewageNXTGPT"
|
1201 |
#file_path = "/app/example.txt" # Path to the file to upload
|
1202 |
+
from huggingface_hub import login
|
1203 |
+
|
1204 |
+
# Login to Hugging Face Hub
|
1205 |
+
login(token=os.getenv("HF_TOKEN"))
|
1206 |
from huggingface_hub import HfApi
|
1207 |
api = HfApi()
|
1208 |
api.upload_file(path_or_fileobj=file_path, repo_id=repo_id, repo_type= "space", path_in_repo="output/output.xlsx")
|