nikhil0pagote commited on
Commit
3f4a19f
·
1 Parent(s): b50366f

added python code

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