GH111 commited on
Commit
8213314
·
1 Parent(s): 08185a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -4,16 +4,16 @@ import streamlit as st
4
  from transformers import pipeline
5
 
6
  # Function to load Hugging Face models
7
- def load_model(model_name):
8
- return pipeline("text-generation", model=model_name, device=0) # Adjust the model type accordingly
9
 
10
  # Page 1: Welcome and Chatbot
11
  def page_welcome():
12
  st.title("Welcome to Your Virtual Therapist")
13
  st.write("Feel free to chat with our virtual therapist!")
14
 
15
- # Load your preferred Hugging Face chatbot model
16
- chatbot_model = load_model("your-chatbot-model-name")
17
 
18
  user_input = st.text_input("You: ")
19
  if user_input:
 
4
  from transformers import pipeline
5
 
6
  # Function to load Hugging Face models
7
+ def load_model():
8
+ return pipeline("conversational", model="alpindale/goliath-120b")
9
 
10
  # Page 1: Welcome and Chatbot
11
  def page_welcome():
12
  st.title("Welcome to Your Virtual Therapist")
13
  st.write("Feel free to chat with our virtual therapist!")
14
 
15
+ # Load the provided Hugging Face chatbot model
16
+ chatbot_model = load_model()
17
 
18
  user_input = st.text_input("You: ")
19
  if user_input: