demo-app / app.py
rajaramesh's picture
Update app.py
0aba942 verified
raw
history blame
271 Bytes
import streamlit as st
from transformers import pipeline
import os
os.environ["TRANSFORMERS_CACHE"] = "/tmp/huggingface"
pipe = pipeline("sentiment-analysis", device=-1) # Forces CPU
text=st.text_area("enter your review")
if text:
out=pipe(text)
st.json(out)