Spaces:
Sleeping
Sleeping
File size: 985 Bytes
f4622ec d7daaf8 18526df b7ea2f1 f4622ec 104b149 f4622ec 9e789ed 104b149 ab046ec |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
#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)
|