Spaces:
Build error
Build error
| import streamlit as st | |
| from transformers import pipeline | |
| # Load the model | |
| chatbot = pipeline("text-generation", model="EleutherAI/gpt-neo-1.3B") | |
| # Streamlit app | |
| st.title("Chat with an LLM") | |
| user_input = st.text_input("Your Message:") | |
| if st.button("Send"): | |
| response = chatbot(user_input, max_length=100, do_sample=True) | |
| st.text_area("LLM Response:", response[0]["generated_text"], height=200) | |