Spaces:
Running
Running
File size: 949 Bytes
9ba153c 18526df 337d2a4 18526df f28f39e d2a9073 7fa4b3c d2a9073 251e5b5 d2a9073 337d2a4 e43ff64 337d2a4 e43ff64 337d2a4 64e3326 337d2a4 e43ff64 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# >>>>>> Adapted/frankensteined from these scripts: <<<<<<<
# for Summary Interface:
# >>>>https://huggingface.co/spaces/khxu/pegasus-text-summarizers/blob/main/app.py
#
import gradio as gr
from transformers import pipeline
from gradio.mix import Parallel, Series
def greet(name):
return "Hello " + name + "!!"
io1 = gr.Interface.load('huggingface/SamuelMiller/lil_sumsum')
# from original script:
# iface = gr.Interface(fn=greet, inputs="text", outputs="text")
# 'huggingface/google/pegasus-large'
desc = "Summarize some text!"
iface = Parallel(io1,
theme='huggingface',
title= 'lil sum sum Summarizer',
description = desc,
# examples=None, #replace "sample" with directory to let gradio scan through those files and give you the text
inputs = gr.inputs.Textbox(lines = 10, label="Text"))
iface.launch(inline = False)
|