adrioui commited on
Commit
15538c6
1 Parent(s): cdd0561

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -1,12 +1,9 @@
 
1
  from transformers import pipeline
2
 
3
  classifier = pipeline("sentiment-analysis")
 
4
 
5
- text = """
6
- Anything you post, upload, share, store, or otherwise provide through the Services is your “User Submission”. Some User Submissions may be viewable by other users. You are solely responsible for all User Submissions you contribute to the Services. You represent that all User Submissions submitted by you are accurate, complete, up-to-date, and in compliance with all applicable laws, rules and regulations.
7
-
8
- """
9
-
10
- res = classifier(text)
11
-
12
- print(res)
 
1
+ import streamlit as st
2
  from transformers import pipeline
3
 
4
  classifier = pipeline("sentiment-analysis")
5
+ text = st.text_area("enter some text: ")
6
 
7
+ if text:
8
+ out = classifier(text)
9
+ st.json(out)