Spaces:
Sleeping
Sleeping
File size: 658 Bytes
3b8bc2d 337d2a4 3b8bc2d 337d2a4 18526df b7ea2f1 dab07cf b7ea2f1 3b8bc2d ab046ec |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import torch
from transformers import pipeline
import gradio as gr
import streamlit as st
from transformers import Speech2TextProcessor, Speech2TextForConditionalGeneration
from gradio.mix import Parallel, Series
desc = "Summarize your text! (audio transcription available soon)"
def summarize(text):
summ = gr.Interface.load('huggingface/google/pegasus-large')
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)
|