Spaces:
Build error
Build error
Download app.py from contenteaseAI/llama3: direct link, hf CLI and curl.
- Browser
- Download file 342 Bytes
-
https://huggingface.co/spaces/contenteaseAI/llama3/resolve/main/app.py
- Command line
-
hf download hf://spaces/contenteaseAI/llama3/app.py
-
curl -L -o app.py https://huggingface.co/spaces/contenteaseAI/llama3/resolve/main/app.py
342 Bytes
| from langchain_community.llms import Ollama | |
| import streamlit as st | |
| llm = Ollama(model="llama3:8b") | |
| st.title("Chatbot using Llama3") | |
| prompt = st.text_area("Enter your prompt:") | |
| if st.button("Generate"): | |
| if prompt: | |
| with st.spinner("Generating response..."): | |
| st.write_stream(llm.stream(prompt, stop=['<|eot_id|>'])) | |