Mishal23 commited on
Commit
ef0d759
1 Parent(s): 36c57b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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/spaces/Mishal23/fine-tuned-dialoGPT-crm-chatbot/{Mishal23/fine-tuned-dialoGPT-crm-chatbot}", 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:
 
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: