Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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'
|
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):
|