Nikhitha2310's picture
Update app.py
5300ee9 verified
raw
history blame contribute delete
280 Bytes
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'])