Spaces:
Sleeping
Sleeping
File size: 271 Bytes
882ddc1 2e509f2 882ddc1 272e54c 0aba942 882ddc1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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) |