Aryan Singla commited on
Commit
f1886ef
1 Parent(s): e55bde8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+ import gradio as gr
3
+
4
+ model = pipeline(
5
+ "summarization",
6
+ )
7
+
8
+ def predict(prompt):
9
+ summary = model(prompt)[0]["summary_text"]
10
+ return summary
11
+
12
+
13
+ # create an interface for the model
14
+ with gr.Interface(predict, "textbox", "text") as interface:
15
+ interface.launch()