Redmind commited on
Commit
e32ac0f
·
verified ·
1 Parent(s): ab0a986

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -643,7 +643,7 @@ def answer_question_thread(user_question, chatbot,audio=None):
643
  while iterations < max_iterations:
644
 
645
  response = agent_executor.invoke({"input": user_question}, config={"callbacks": [langfuse_handler]}, early_stopping_method="generate")
646
- create_file_HF()
647
  if isinstance(response, dict):
648
  response_text = response.get("output", "")
649
  else:
@@ -1182,6 +1182,7 @@ def handle_large_dataset(df, create_document,isDataFrame):
1182
  file_path = "output_data.xlsx"
1183
  #download_url = repo.get_download_url(file_path)
1184
  create_file_HF(file_path)
 
1185
 
1186
  #save_file_to_hostinger('output_data.xlsx')
1187
  # 4. Create a summary and table of the first 10 rows for display
@@ -1218,7 +1219,7 @@ def create_file_HF(file_path):
1218
 
1219
  from huggingface_hub import HfApi
1220
  api = HfApi()
1221
- api.upload_file(path_or_fileobj=file_path, repo_id="Redmind/NewageNXTGPT_Repo_trial",revision = "test-branch", repo_type= "space", path_in_repo='./output')
1222
 
1223
 
1224
  def create_pdf(cname,ename,account_number):
 
643
  while iterations < max_iterations:
644
 
645
  response = agent_executor.invoke({"input": user_question}, config={"callbacks": [langfuse_handler]}, early_stopping_method="generate")
646
+ #create_file_HF()
647
  if isinstance(response, dict):
648
  response_text = response.get("output", "")
649
  else:
 
1182
  file_path = "output_data.xlsx"
1183
  #download_url = repo.get_download_url(file_path)
1184
  create_file_HF(file_path)
1185
+ print("File created in the home path")
1186
 
1187
  #save_file_to_hostinger('output_data.xlsx')
1188
  # 4. Create a summary and table of the first 10 rows for display
 
1219
 
1220
  from huggingface_hub import HfApi
1221
  api = HfApi()
1222
+ api.upload_file(path_or_fileobj=file_path, repo_id="Redmind/NewageNXTGPT_Repo_trial",revision = "test-branch", repo_type= "space", path_in_repo='./')
1223
 
1224
 
1225
  def create_pdf(cname,ename,account_number):