MD1998 commited on
Commit
2bf87ab
1 Parent(s): 4de02dd
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -1,7 +1,14 @@
1
  import gradio as gr
 
 
 
 
 
 
 
 
 
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
 
6
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
  iface.launch()
 
1
  import gradio as gr
2
+ from langchain_community.llms import CTransformers
3
+
4
+ llm = CTransformers(model="TheBloke/Llama-2-7b-Chat-GGUF", model_file="llama-2-7b-chat.q4_K_M.gguf"')
5
+
6
+
7
+
8
+ def greet(prompt):
9
+ return llm(prompt)
10
+
11
 
 
 
12
 
13
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
14
  iface.launch()