Zack Saadioui
8/27/2024
1
2
bash
pip install streamlit
1
2
bash
ollama pull llama3
1
2
bash
ollama run llama3
1
2
bash
ollama list
1
chat_app.py
1 2 3 4 5 6 7 8 9 10
import 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.py
1
temperature
1
top_k
Copyright © Arsturn 2025