Create app.py
Browse files
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 |
+
|