test / app.py
lmastm's picture
Update app.py
cd38eaa verified
raw
history blame contribute delete
263 Bytes
import streamlit as st
from transformers import pipeline
import torch
access_token = st.secrets["access_token"]
pipe = pipeline("sentiment-analysis", token=access_token)
text = st.text_area("Enter a sentence !!!")
if text:
out = pipe(text)
st.json(out)