Update app.py
Browse files
app.py
CHANGED
|
@@ -29,9 +29,9 @@ def call_private_api(user_input):
|
|
| 29 |
timeout=300,
|
| 30 |
)
|
| 31 |
if response.status_code == 200:
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
except Exception as e:
|
| 36 |
return {"error": f"Connection failed: {str(e)}"}
|
| 37 |
|
|
|
|
| 29 |
timeout=300,
|
| 30 |
)
|
| 31 |
if response.status_code == 200:
|
| 32 |
+
return response.json()
|
| 33 |
+
else:
|
| 34 |
+
return {"error": f"Status {response.status_code}", "detail": response.text}
|
| 35 |
except Exception as e:
|
| 36 |
return {"error": f"Connection failed: {str(e)}"}
|
| 37 |
|