Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ class BasicAgent:
|
|
16 |
|
17 |
def __call__(self, question: str) -> str:
|
18 |
try:
|
19 |
-
response = requests.post(f"{self.endpoint}
|
20 |
result = response.json()
|
21 |
return result["data"][0] if "data" in result else "null"
|
22 |
except Exception as e:
|
|
|
16 |
|
17 |
def __call__(self, question: str) -> str:
|
18 |
try:
|
19 |
+
response = requests.post(f"{self.endpoint}", json={"data": [question]}, timeout=60) # new change: removed /run
|
20 |
result = response.json()
|
21 |
return result["data"][0] if "data" in result else "null"
|
22 |
except Exception as e:
|