Sandiago21 commited on
Commit
150da08
·
verified ·
1 Parent(s): 6762d68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -922,20 +922,20 @@ class BasicAgent:
922
  # Check if the request was successful
923
  if response.status_code == 200:
924
  # Save the content to a local file
925
- with open("downloaded_file.xlsx", "wb") as f:
926
  f.write(response.content)
927
  print("File downloaded successfully!")
928
  else:
929
  print(f"Failed to download file: {response.status_code}")
930
 
931
- # df = pd.read_excel("downloaded_file.xlsx")
932
 
933
  try:
934
  # response = self.safe_app.invoke(state)
935
  # agent_answer = response["output"]
936
 
937
  # agent_answer = str(df)
938
- agent_answer = str(response.status_code)
939
  except:
940
  agent_answer = ""
941
 
 
922
  # Check if the request was successful
923
  if response.status_code == 200:
924
  # Save the content to a local file
925
+ with open(filename, "wb") as f:
926
  f.write(response.content)
927
  print("File downloaded successfully!")
928
  else:
929
  print(f"Failed to download file: {response.status_code}")
930
 
931
+ # df = pd.read_excel(filename)
932
 
933
  try:
934
  # response = self.safe_app.invoke(state)
935
  # agent_answer = response["output"]
936
 
937
  # agent_answer = str(df)
938
+ agent_answer = str(response.status_code) + " - " + task_id
939
  except:
940
  agent_answer = ""
941