Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def generate_response(prompt):
|
|
14 |
|
15 |
try:
|
16 |
# Make the API call to the Hugging Face model
|
17 |
-
response = requests.post(f"https://huggingface.co/
|
18 |
response.raise_for_status() # Raise an error for bad responses
|
19 |
return response.json()[0]['generated_text']
|
20 |
except requests.exceptions.HTTPError as http_err:
|
|
|
14 |
|
15 |
try:
|
16 |
# Make the API call to the Hugging Face model
|
17 |
+
response = requests.post(f"https://api-inference.huggingface.co/models/{MODEL_ID}", headers=headers, json=payload)
|
18 |
response.raise_for_status() # Raise an error for bad responses
|
19 |
return response.json()[0]['generated_text']
|
20 |
except requests.exceptions.HTTPError as http_err:
|