Redmind commited on
Commit
81e420d
·
verified ·
1 Parent(s): a9c1aca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1199,8 +1199,9 @@ 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
-
1203
- upload_file(path_or_fileobj=file_path, repo_id=repo_id, path_in_repo="output/output.xlsx")
 
1204
 
1205
  from huggingface_hub import hf_hub_url
1206
 
 
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")
1205
 
1206
  from huggingface_hub import hf_hub_url
1207