Spaces:
Build error
Build error
Download app.py from Bahareh0281/MTS: direct link, hf CLI and curl.
- Browser
- Download file 403 Bytes
-
https://huggingface.co/spaces/Bahareh0281/MTS/resolve/main/app.py
- Command line
-
hf download hf://spaces/Bahareh0281/MTS/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Bahareh0281/MTS/resolve/main/app.py
403 Bytes
| 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) | |