Spaces:
Sleeping
Sleeping
Fixed token authentication issue
Browse files
app.py
CHANGED
|
@@ -3,9 +3,11 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
| 3 |
import torch
|
| 4 |
|
| 5 |
# ✅ Load the trained chatbot model from Hugging Face
|
| 6 |
-
MODEL_NAME = "eabybabu/chatbot_model" # Replace with your
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
| 9 |
|
| 10 |
# ✅ Function to generate chatbot responses
|
| 11 |
def chatbot_response(user_input):
|
|
|
|
| 3 |
import torch
|
| 4 |
|
| 5 |
# ✅ Load the trained chatbot model from Hugging Face
|
| 6 |
+
MODEL_NAME = "eabybabu/chatbot_model" # Replace with your actual model name
|
| 7 |
+
|
| 8 |
+
# ✅ Fix the authentication issue
|
| 9 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME, token=True)
|
| 10 |
+
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME, token=True)
|
| 11 |
|
| 12 |
# ✅ Function to generate chatbot responses
|
| 13 |
def chatbot_response(user_input):
|