eabybabu commited on
Commit
9144ebb
·
1 Parent(s): cd029d1

Fixed token authentication issue

Browse files
Files changed (1) hide show
  1. app.py +5 -3
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 Hugging Face model
7
- tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME, use_auth_token=True)
8
- model = AutoModelForCausalLM.from_pretrained(MODEL_NAME, use_auth_token=True)
 
 
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):