Update app.py
Browse files
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(
|
| 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(
|
| 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 |
|