Alexvatti commited on
Commit
c42c749
·
verified ·
1 Parent(s): 5f5a4b8

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import ollama
2
+ import gradio as gr
3
+
4
+ def chat(prompt):
5
+ response = ollama.chat(model="mistral", messages=[{"role": "user", "content": prompt}])
6
+ return response["message"]["content"]
7
+
8
+ iface = gr.Interface(fn=chat, inputs="text", outputs="text")
9
+ iface.launch()