johnnyfivefingers commited on
Commit
817f881
1 Parent(s): 408f343

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -3,11 +3,13 @@ import gradio as gr
3
  from transformers import pipeline
4
 
5
  #hub_model_id = "huggingface-course/mt5-small-finetuned-amazon-en-es"
6
- model_id = "philschmid/bart-large-cnn-samsum"
 
 
7
  summarizer = pipeline("summarization", model=model_id)
8
 
9
  def summarize(text):
10
- return "Summary: " + summarizer(text) + ""
11
 
12
  iface = gr.Interface(fn=summarize, inputs="text", outputs="text")
13
  iface.launch()
 
3
  from transformers import pipeline
4
 
5
  #hub_model_id = "huggingface-course/mt5-small-finetuned-amazon-en-es"
6
+ #model_id = "philschmid/bart-large-cnn-samsum"
7
+ model_id = "t5-base"
8
+
9
  summarizer = pipeline("summarization", model=model_id)
10
 
11
  def summarize(text):
12
+ return "Summary: " + summarizer(text)
13
 
14
  iface = gr.Interface(fn=summarize, inputs="text", outputs="text")
15
  iface.launch()