mahiatlinux commited on
Commit
22a3f24
·
verified ·
1 Parent(s): 6f15dec

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from langchain_community.llms import Ollama
2
+ import gradio as gr
3
+
4
+ def generate(name):
5
+ llm = Ollama(model="codellama")
6
+
7
+ response = llm.invoke(name)
8
+
9
+ return response
10
+
11
+ iface = gr.ChatInterface(fn=generate)
12
+ iface.launch()