Zack Saadioui
8/27/2024
1
2
bash
pip install streamlit1
2
bash
ollama pull llama31
2
bash
ollama run llama31
2
bash
ollama list1
chat_app.py1 2 3 4 5 6 7 8 9 10import streamlit as st import requests st.title('Ollama Chatbot') user_input = st.text_input('You:', '') if user_input: response = requests.post('http://localhost:11434/api/generate', json={'model': 'gemma:2b', 'prompt': user_input}) output = response.json()['response'] st.text(f'Bot: {output}')
1
2
bash
streamlit run chat_app.py1
temperature1
top_kCopyright © Arsturn 2025