arpm01 commited on
Commit
86b591d
·
1 Parent(s): 83b7249

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,14 +1,14 @@
1
  import gradio as gr
2
- from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
3
 
4
  tokenizer = AutoTokenizer.from_pretrained("human-centered-summarization/financial-summarization-pegasus")
5
 
6
  model = AutoModelForSeq2SeqLM.from_pretrained("human-centered-summarization/financial-summarization-pegasus")
7
- pipe = pipeline(task="summarization",
8
  model=model,
9
  tokenizer=tokenizer,)
10
 
11
  gr.Interface.from_pipeline(pipe,
12
- title="financial summarization",
13
  description="Add description",
14
  ).launch()
 
1
  import gradio as gr
2
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, Text2TextGenerationPipeline, pipeline
3
 
4
  tokenizer = AutoTokenizer.from_pretrained("human-centered-summarization/financial-summarization-pegasus")
5
 
6
  model = AutoModelForSeq2SeqLM.from_pretrained("human-centered-summarization/financial-summarization-pegasus")
7
+ pipe = pipeline(task="text2text-generation",
8
  model=model,
9
  tokenizer=tokenizer,)
10
 
11
  gr.Interface.from_pipeline(pipe,
12
+ title="financial text2text",
13
  description="Add description",
14
  ).launch()