SummarAI-Z / app.py
s03f3ff's picture
Create app.py
cef63ff verified
raw
history blame
451 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="jonatasgrosman/wav2vec2-large-xlsr-53-english")
pipe2 = pipeline("summarization", model="facebook/bart-large-cnn")
def launch(input):
out = pipe(input)
out2 = pipe2(input)
return out[0]['audio']
iface = gr.Interface(launch,
inputs=gr.Image(type='pil'),
outputs="text")
iface.launch()