sabahat-shakeel commited on
Commit
7754800
·
verified ·
1 Parent(s): 31ac415

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,8 +4,8 @@ from transformers import pipeline
4
  # Configure the Hugging Face API key
5
  HF_API_KEY = st.secrets['huggingface_api_key']
6
 
7
- # Initialize the Hugging Face model with the API key
8
- generator = pipeline('text-generation', model='gpt2', tokenizer='gpt2', use_auth_token=HF_API_KEY)
9
 
10
  # Function to get response from the Hugging Face model
11
  def get_chatbot_response(user_input):
 
4
  # Configure the Hugging Face API key
5
  HF_API_KEY = st.secrets['huggingface_api_key']
6
 
7
+ # Initialize the Hugging Face model with the API key (authentication done separately)
8
+ generator = pipeline('text-generation', model='gpt2', tokenizer='gpt2')
9
 
10
  # Function to get response from the Hugging Face model
11
  def get_chatbot_response(user_input):