Test452774 commited on
Commit
c0ce7f2
·
verified ·
1 Parent(s): e2eb0ec

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 transformers import pipeline
3
+
4
+ pipe = pipeline("text-generation", model="Qwen/Qwen2.5-Coder-32B-Instruct")
5
+
6
+ def predict(text):
7
+ results = pipe(text)
8
+ return results[0]['generated_text']
9
+
10
+ demo = gr.Interface(fn=predict, inputs="text", outputs="text")
11
+ demo.launch()
12
+