Goated121 commited on
Commit
fbe83b1
·
verified ·
1 Parent(s): fb255d5

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from llama_cpp import Llama # if using llama.cpp via GGUF
3
+
4
+ # Load quantized model
5
+ model = Llama(model_path="qwen2.5-1.5B-q4.gguf")
6
+
7
+ def generate(prompt):
8
+ output = model(prompt, max_tokens=100)
9
+ return output['text']
10
+
11
+ demo = gr.Interface(fn=generate, inputs="text", outputs="text")
12
+ demo.launch()