import streamlit as st from transformers import pipeline # Load Hugging Face chatbot model chatbot_model = pipeline("conversational", model="alpindale/goliath-120b") # Main Page with Chatbot def main(): st.title("Virtual Therapist Chatbot") st.write("Feel free to chat with our virtual therapist!") # User input for the chatbot user_input = st.text_input("You: ") # Generate response when user enters input if user_input: response = chatbot_model(user_input, max_length=50, num_return_sequences=1)[0]['generated_text'] st.text_area("Therapist:", response, height=100) # Run the main function if __name__ == "__main__": main()