File size: 472 Bytes
d1b03d9
4ee9078
 
 
 
 
 
 
 
 
 
 
 
d1b03d9
 
4ee9078
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr
import ollama

def chat_with_spacebot(message):
    response = ollama.chat(model="sdsiddharth/SPACEBOT", messages=[{"role": "user", "content": message}])
    return response['message']['content']

iface = gr.Interface(
    fn=chat_with_spacebot,
    inputs=gr.Textbox(label="Ask SPACEBOT"),
    outputs=gr.Textbox(label="Response"),
    title="🚀 Chat with SPACEBOT",
    description="Try SPACEBOT instantly without installation!",
)

iface.launch()