Spaces:
Runtime error
Runtime error
File size: 446 Bytes
4770a86 408f343 4770a86 408f343 817f881 408f343 0648c61 408f343 4770a86 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import gradio as gr
from transformers import pipeline
#hub_model_id = "huggingface-course/mt5-small-finetuned-amazon-en-es"
#model_id = "philschmid/bart-large-cnn-samsum"
model_id = "t5-base"
summarizer = pipeline("summarization", model=model_id)
def summarize(text):
return "Summary: " + text
#return "Summary: " + str(summarizer(text)[0]["summary_text"])
iface = gr.Interface(fn=summarize, inputs="text", outputs="text")
iface.launch() |