Spaces:
Runtime error
Runtime error
import streamlit as st | |
from transformers import pipeline | |
def load_summarizer(): | |
whisper = pipeline('automatic-speech-recognition' , model ='openai/whisper-medium') #audio-to-text | |
summarize = pipeline("summarization", device=0) | |
senti = pipeline("sentiment-analysis",device=0) | |
nameentity = pipeline("ner",device=0) | |
translate = pipeline("translation", device=0) | |
return whisper, summarize, senti, nameentity, translate | |
#pipe = pipeline("sentiment-analysis") | |
text = st.text_area('Enter some Text!') | |
summarizer = load_summarizer() | |
st.title("Summarize Text") | |
sentence = st.text_area('Please paste your article :', height=30) | |
button = st.button("Click") | |
if text: | |
out=pipe(text) | |
st.json(out) | |