Redmind commited on
Commit
93846e9
·
verified ·
1 Parent(s): 4812b9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -107,6 +107,7 @@ DB_NAME = 'u852023448_redmindgpt'
107
  from huggingface_hub import create_branch, create_tag
108
  from huggingface_hub import login
109
  from huggingface_hub import HfApi
 
110
  token = os.getenv("HF_TOKEN")
111
  login(token=os.getenv("HF_TOKEN"))
112
 
@@ -1222,7 +1223,7 @@ def handle_large_dataset(df, create_document,isDataFrame):
1222
 
1223
  def create_file_HF(file_path,directory):
1224
 
1225
- api = HfApi()
1226
 
1227
  repo_id = "Redmind/NewageNXTGPT_Repo_trial"
1228
 
@@ -1271,7 +1272,7 @@ def directory_exists(repo_id, directory, token):
1271
 
1272
 
1273
  from datetime import datetime
1274
- api= new HFApi()
1275
  # List all files in the repository
1276
  files = api.list_repo_files(repo_id=repo_id, repo_type="space", token=token)
1277
  # Check if any file starts with the directory path
 
107
  from huggingface_hub import create_branch, create_tag
108
  from huggingface_hub import login
109
  from huggingface_hub import HfApi
110
+ api= HFApi()
111
  token = os.getenv("HF_TOKEN")
112
  login(token=os.getenv("HF_TOKEN"))
113
 
 
1223
 
1224
  def create_file_HF(file_path,directory):
1225
 
1226
+
1227
 
1228
  repo_id = "Redmind/NewageNXTGPT_Repo_trial"
1229
 
 
1272
 
1273
 
1274
  from datetime import datetime
1275
+
1276
  # List all files in the repository
1277
  files = api.list_repo_files(repo_id=repo_id, repo_type="space", token=token)
1278
  # Check if any file starts with the directory path