Spaces:
Sleeping
Sleeping
#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)" | |
import streamlit as st | |
from transformers import pipeline | |
pipe = pipeline('sentiment-analysis') | |
text = st.text_area('enter some text!') | |
if text: | |
out = pipe(text) | |
st.json(out) | |
#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) | |