llama3-chatbot / app.py
sumit-adikari's picture
Create app.py
e0a807f verified
raw
history blame contribute delete
365 Bytes
import gradio as gr
import ollama
MODEL = "llama3"
def chatbot(message, history):
response = ollama.chat(model=MODEL, messages=[{"role": "user", "content": message}])
return response['message']['content']
with gr.Blocks() as demo:
gr.Markdown("# 💬 Simple Chatbot using Llama3 (Ollama)")
chatbot_ui = gr.ChatInterface(fn=chatbot)
demo.launch()