Ezinwanne Aka commited on
Commit
a424293
·
unverified ·
1 Parent(s): 23a45f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,10 +1,12 @@
1
  from transformers import pipeline
2
  import gradio as gr
3
 
4
- model = pipeline("summarization")
 
 
5
 
6
  def predict(prompt):
7
- summary = model(prompt)[0]['summary text']
8
  return summary
9
 
10
  with gr.Interface(predict, "textbox", "text") as interface:
 
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
  with gr.Interface(predict, "textbox", "text") as interface: