Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ def query_huggingface(payload):
|
|
| 11 |
try:
|
| 12 |
response = requests.post(API_URL, headers=HEADERS, json=payload)
|
| 13 |
response.raise_for_status() # Raise exception for non-2xx status codes
|
| 14 |
-
return response.json()
|
| 15 |
except requests.exceptions.RequestException as e:
|
| 16 |
print(f"Error querying Hugging Face API: {e}")
|
| 17 |
return f"Error querying Hugging Face API: {e}"
|
|
|
|
| 11 |
try:
|
| 12 |
response = requests.post(API_URL, headers=HEADERS, json=payload)
|
| 13 |
response.raise_for_status() # Raise exception for non-2xx status codes
|
| 14 |
+
return response.json()
|
| 15 |
except requests.exceptions.RequestException as e:
|
| 16 |
print(f"Error querying Hugging Face API: {e}")
|
| 17 |
return f"Error querying Hugging Face API: {e}"
|