Spaces:
Runtime error
Runtime error
gaspar-avit
commited on
Commit
·
19dace0
1
Parent(s):
95a5558
Upload app.py
Browse files
app.py
CHANGED
@@ -190,11 +190,14 @@ def query_generate(text):
|
|
190 |
|
191 |
response = requests.post(API_URL, headers=headers, json=payload)
|
192 |
|
193 |
-
if
|
|
|
|
|
194 |
payload = {"inputs": f"{text}",
|
195 |
"options": {"wait_for_model": True},
|
196 |
}
|
197 |
response = requests.post(API_URL, headers=headers, json=payload)
|
|
|
198 |
|
199 |
return response.content
|
200 |
|
|
|
190 |
|
191 |
response = requests.post(API_URL, headers=headers, json=payload)
|
192 |
|
193 |
+
if isinstance(response.content):
|
194 |
+
|
195 |
+
# if 'error' in response.content.decode("utf-8"):
|
196 |
payload = {"inputs": f"{text}",
|
197 |
"options": {"wait_for_model": True},
|
198 |
}
|
199 |
response = requests.post(API_URL, headers=headers, json=payload)
|
200 |
+
|
201 |
|
202 |
return response.content
|
203 |
|