File size: 280 Bytes
3aa3370 37df66f 71a76a0 37df66f ed4b0b3 37df66f 5300ee9 |
1 2 3 4 5 6 7 8 9 10 |
import os
import streamlit as st
from transformers import pipeline
inp=st.text_input("Enter the text")
btn=st.button("Submit")
pipe=pipeline(task='text-classification',model='cardiffnlp/twitter-roberta-base-sentiment-latest')
if(inp and btn):
st.write(pipe(inp)[0]['label']) |