Spaces:
Sleeping
Sleeping
File size: 357 Bytes
882ddc1 7ff8cfa 882ddc1 6799125 272e54c 6799125 0aba942 7ff8cfa 6799125 882ddc1 7ff8cfa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import streamlit as st
from transformers import pipeline
# import os
# os.environ["TRANSFORMERS_CACHE"] = "/tmp/huggingface"
# pipe = pipeline("sentiment-analysis", device=-1) # Forces CPU
pipe = pipeline("sentiment-analysis")
text=st.text_area("enter something")
if text:
out=pipe(text)
st.json(out)
# st.write(f"You have entered {text}") |