rsatish1110 commited on
Commit
c392459
1 Parent(s): 9f08a08

Create new file

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+
3
+ model = pipeline("text-generation")
4
+
5
+
6
+ def predict(prompt):
7
+ completion = model(prompt)[0]["generated_text"]
8
+ return completion
9
+
10
+ import gradio as gr
11
+
12
+ gr.Interface(fn=predict, inputs="text", outputs="text").launch()