Spaces:
Runtime error
Runtime error
test_1
Browse files
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()
|