Redmind commited on
Commit
dfad006
·
verified ·
1 Parent(s): f83ff8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1144,7 +1144,7 @@ def handle_large_dataset(df, create_document,isDataFrame):
1144
  #print(df)
1145
  print(f"Total rows: {total_rows}")
1146
 
1147
- docstatus = f"Download the complete dataset <a href='https://huggingface.co/spaces/Redmind/NewageNXTGPT/blob/main/output/output.xlsx' download> here.</a>.There are total of {total_rows} rows."
1148
  #docstatus = f"Download the complete dataset <a href='https://redmindtechnologies.com/RedMindGPT/output.xlsx' download> here.</a>.There are total of {total_rows} rows."
1149
  if total_rows < 4000:
1150
 
@@ -1207,12 +1207,12 @@ def handle_large_dataset(df, create_document,isDataFrame):
1207
  login(token=os.getenv("HF_TOKEN"))
1208
  from huggingface_hub import HfApi
1209
  api = HfApi()
1210
- api.upload_file(path_or_fileobj=file_path, repo_id=repo_id, repo_type= "space", path_in_repo="output/output.xlsx")
1211
 
1212
  from huggingface_hub import hf_hub_url
1213
 
1214
  print(hf_hub_url(
1215
- repo_id="Redmind/NewageNXTGPT", filename="output/output.xlsx"
1216
  ))
1217
 
1218
  #print(f"Download the file here: {download_url}")
@@ -1255,7 +1255,7 @@ def create_pdf(name,id):
1255
  output.write(filled.read())
1256
 
1257
  repo_id = "Redmind/NewageNXTGPT"
1258
- file_output=f"output/{output_file_name}"
1259
  api.upload_file(path_or_fileobj=output_file_name, repo_id=repo_id, repo_type= "space", path_in_repo=file_output)
1260
  return f"{output_file_name} is created successfully."
1261
 
 
1144
  #print(df)
1145
  print(f"Total rows: {total_rows}")
1146
 
1147
+ docstatus = f"Download the complete dataset <a href='https://huggingface.co/spaces/Redmind/NewageNXTGPT/blob/main/assets/output.xlsx' download> here.</a>.There are total of {total_rows} rows."
1148
  #docstatus = f"Download the complete dataset <a href='https://redmindtechnologies.com/RedMindGPT/output.xlsx' download> here.</a>.There are total of {total_rows} rows."
1149
  if total_rows < 4000:
1150
 
 
1207
  login(token=os.getenv("HF_TOKEN"))
1208
  from huggingface_hub import HfApi
1209
  api = HfApi()
1210
+ api.upload_file(path_or_fileobj=file_path, repo_id=repo_id, repo_type= "space", path_in_repo="assets/output.xlsx")
1211
 
1212
  from huggingface_hub import hf_hub_url
1213
 
1214
  print(hf_hub_url(
1215
+ repo_id="Redmind/NewageNXTGPT", filename="assets/output.xlsx"
1216
  ))
1217
 
1218
  #print(f"Download the file here: {download_url}")
 
1255
  output.write(filled.read())
1256
 
1257
  repo_id = "Redmind/NewageNXTGPT"
1258
+ file_output=f"assets/{output_file_name}"
1259
  api.upload_file(path_or_fileobj=output_file_name, repo_id=repo_id, repo_type= "space", path_in_repo=file_output)
1260
  return f"{output_file_name} is created successfully."
1261