Spaces:
Runtime error
Runtime error
File size: 625 Bytes
c2cbc53 5235ed9 8142bba 89032c4 8142bba 89032c4 d859e21 fc7c04c 83b7249 8142bba a80dbe8 a425649 86b591d 8142bba a80dbe8 8142bba |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import gradio as gr
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
tokenizer = AutoTokenizer.from_pretrained("human-centered-summarization/financial-summarization-pegasus")
model = AutoModelForSeq2SeqLM.from_pretrained("human-centered-summarization/financial-summarization-pegasus")
pipe = pipeline(task="summarization",
model=model,
tokenizer=tokenizer,)
gr.Interface.from_pipeline(pipe,
title="financial text2text",
description="Add description",
examples=['text1.txt']
).launch() |