Spaces:
Sleeping
Sleeping
import torch | |
from transformers import pipeline | |
import gradio as gr | |
from transformers import Speech2TextProcessor, Speech2TextForConditionalGeneration | |
from gradio.mix import Parallel, Series | |
desc = "Summarize your text! (audio transcription available soon)" | |
qa_model = 'huggingface/SamuelMiller/qa_squad' | |
my_model = 'huggingface/SamuelMiller/lil_sumsum' | |
better_model = 'huggingface/google/pegasus-large' | |
def summarize(text): | |
summ = gr.Interface.load(qa_model) | |
summary = summ(text) | |
return summary | |
iface = gr.Interface(fn=summarize, | |
theme='huggingface', | |
title= 'sum_it', | |
description= desc, | |
inputs= "text", | |
outputs= 'textbox') | |
iface.launch(inline = False) | |