ailm commited on
Commit
d086dfc
1 Parent(s): c63161d

update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,9 +1,9 @@
1
  from transformers import PegasusForConditionalGeneration, PegasusTokenizer
2
  import gradio as gr
3
 
4
- model_name = "ailm/pegasus-samsum-model"
5
  model = PegasusForConditionalGeneration.from_pretrained(model_name)
6
- tokenizer = PegasusTokenizer.from_pretrained(f"{model_name}/tokenizer")
7
 
8
  def summarize(text):
9
  tokens = tokenizer(text, truncation=True, padding="longest", return_tensors="pt")
 
1
  from transformers import PegasusForConditionalGeneration, PegasusTokenizer
2
  import gradio as gr
3
 
4
+ model_name = "ailm/pegsus-text-summarization"
5
  model = PegasusForConditionalGeneration.from_pretrained(model_name)
6
+ tokenizer = PegasusTokenizer.from_pretrained(model_name)
7
 
8
  def summarize(text):
9
  tokens = tokenizer(text, truncation=True, padding="longest", return_tensors="pt")