flexnotop commited on
Commit
8d4917a
1 Parent(s): f6c51e6

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import streamlit as st
3
+ from transformers import pipeline
4
+ st.title(" :smile: IMDB MOVIES SENTIMENT ANALYSIS")
5
+
6
+ user_input = st.text_input("Enter your text:")
7
+
8
+ classifier=pipeline("text-classification",model="flexnotop/imdb-v1",device=0)
9
+ if st.button("Classify"):
10
+ if user_input:
11
+ result=classifier(user_input)
12
+ print(result);
13
+ else:
14
+ st.write("Please enter some text")
15
+
16
+