forked from Niketkumardheeryan/ML-CaPsule
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sent-analysis-app.py
74 lines (54 loc) · 12.4 KB
/
sent-analysis-app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import numpy as np
import pandas as pd
import pickle
import streamlit as st
import base64
from PIL import Image
#df = pd.read_csv('/content/drive/My Drive/amazonreviews.tsv',sep='\t')
model=pickle.load(open('sentiment_analysis_model.p','rb'))
st.set_page_config(page_title="Sentiment Analysis Web App",page_icon="",layout="centered",initial_sidebar_state="expanded",)
st.title('Sentiment Analysis Model')
st.subheader('by Charan Kumar ')
image='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARcAAAC1CAMAAABCrku3AAABX1BMVEX////ta1r9yC442ouPj5mIiJOMjJbtaViGhpHLy8/8/PyRkZv/ySrsYlChoamWlp/tZlQu2Yfw8fHBwcb9xhu4pX+EiZ/nvlOqqrHc3N+Tipqlpa2ztLm6vcEl2ISbm6Tm5uiHkZ3sXkrS0tbs7O3IyM39xAD+8N+Vh5q5ub7+8+xg4J/xjYHscGD//P/5/vzn+e/Q9uL81GbwubKo7sn1sKKGmJf4xsDsfnDZ9ub74t/98dJS25b85MH9zV9G3pT8yz3++u/8zW783q382py97dNy5Kr8zk6e6sH81YnjcmX50Muhi5F7oZb+3oj/9uT2ta38263+23n2s6DzpJWG4rH86rv65+GQ57jxm4r90nr82qD84cL80o3pj4T72s7KfnrfuV2km49xrpRmuJKCm5fZdm34wUdKzY6xhonLooSwoIS7nYzisW3Vs2XUqXpZwJDst19vs5Sph4u/gYA/7A6dAAAdyUlEQVR4nO1dC3vTRrp2EkmWZVuyZZe1YsdyfElqJ45NSCAkIRcgFxIKlOYC6S50CwX27Nk97Lb//znfjOamuxyyPXs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uCMlgcjnOmDBa/APVHkB9bB0XdQByikdiJ4UVU0ug6uDQKGy8OtukhHJRgPMiWKbCDDqiEfZXZlFYdoMlYC9AEcl2pEhUkgAeh3cF3I15kGrgFBE/RcUXXkTZD/U+umjEaSmVNlSTXAs5qSHBNaW3N9FoV0GnoDk2Q16rWeltEqFRi4lmvUrUyugvkAu+bIiDlX0/tR8Uu3P4fb6lXw3xYqj6tqubmepmN/1K/1zD662u3XGppJSvYrPdKfvl7LRUePYJk1pw76C13Va/iuZr8+53QfRlXPkY/wuWFBWTSyaDn8/WGifptytDn9ClFT9TmwLCGB/1cLDRwdQIqwTF8pup1Kv5PkybgUKVKkSPEfjf8FVaKAa1hs3AIAAAAASUVORK5CYII='
st.image(image, caption='',use_column_width=False)
#main_bg = "https://cdn.miscellaneoushi.com/1440x900/20121018/abstract%20technology%20hearts%201440x900%20wallpaper_www.miscellaneoushi.com_20.jpg"
#main_bg_ext = "jpg"
#st.markdown(
# f"""
# <style>
# .reportview-container {{
# background: url(data:image/{main_bg_ext};base64,{base64.b64encode(open(main_bg, "rb").read()).decode()})
#}}
#</style>
#""",
#unsafe_allow_html=True
#)
st.markdown("""
<style>
body {
color: #ff0000;
background-color: #001f;
etc.
}
</style>
""", unsafe_allow_html=True)
st.subheader('Enter Text')
message = st.text_area("","Type Here ...")
if st.button('PREDICT'):
disp=""
a=model.predict([message])[0]
if(a== 'pos'):
disp = "Positive Review!"
else:
disp = "Negative Review!"
st.header(f"**{a}**")
q = model.predict_proba([message])
#for index, item in enumerate(df['review']):
#st.write(f'{item} : {q[0][index]*100}%')
st.sidebar.subheader("About App")
st.sidebar.info("This web app is made as part of Sentiment Analysis Project")
st.sidebar.info("Scroll down and type your text in the writing area")
st.sidebar.info("Click on the 'Predict' button to check whether the entered text is 'Positive' or 'Negative' ")
feedback = st.sidebar.slider('How much would you rate this app?',min_value=0,max_value=10,step=1)
if feedback:
st.header("Thank you for rating the app!")