Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| from transformers import pipeline | |
| # Load chatbot model | |
| chatbot = pipeline("text-generation", model="microsoft/DialoGPT-medium") | |
| st.title("AI Chatbot") | |
| st.write("Ask me anything!") | |
| # User input | |
| user_input = st.text_input("You:") | |
| if user_input: | |
| response = chatbot(user_input, max_length=100, num_return_sequences=1) | |
| st.text_area("Bot:", response[0]['generated_text']) | |