Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,8 @@ MODEL_ID = "Mishal23/fine-tuned-dialoGPT-crm-chatbot" # Your model ID
|
|
6 |
|
7 |
# Function to generate a response from the chatbot using the Hugging Face API
|
8 |
def generate_response(prompt):
|
9 |
-
|
|
|
10 |
payload = {"inputs": prompt}
|
11 |
|
12 |
try:
|
|
|
6 |
|
7 |
# Function to generate a response from the chatbot using the Hugging Face API
|
8 |
def generate_response(prompt):
|
9 |
+
# Use the secret token safely
|
10 |
+
headers = {"Authorization": f"Bearer {st.secrets['project01']['hf_token']}"}
|
11 |
payload = {"inputs": prompt}
|
12 |
|
13 |
try:
|