Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -38,37 +38,42 @@ Sentiment:"""
|
|
38 |
def main():
|
39 |
st.set_page_config(page_title="Urdu Sentiment Analysis", page_icon="π΅π°", layout="wide")
|
40 |
|
|
|
41 |
st.markdown("""
|
42 |
<style>
|
43 |
.main {
|
44 |
-
background-color: #f0f2f6;
|
45 |
padding: 2rem;
|
46 |
border-radius: 10px;
|
47 |
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
48 |
}
|
49 |
.title {
|
50 |
-
color: #
|
51 |
font-size: 2.5rem;
|
52 |
margin-bottom: 1rem;
|
|
|
53 |
}
|
54 |
.subtitle {
|
55 |
-
color: #
|
56 |
font-size: 1.2rem;
|
57 |
margin-bottom: 2rem;
|
58 |
}
|
59 |
-
.input
|
60 |
-
background-color:
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
|
|
64 |
}
|
65 |
.result-box {
|
66 |
-
background-color:
|
67 |
-
border: 1px solid #e2e8f0;
|
68 |
border-radius: 5px;
|
69 |
padding: 1rem;
|
70 |
margin-top: 2rem;
|
71 |
}
|
|
|
|
|
|
|
|
|
72 |
</style>
|
73 |
""", unsafe_allow_html=True)
|
74 |
|
@@ -77,7 +82,7 @@ def main():
|
|
77 |
|
78 |
urdu_text = st.text_area("Enter Urdu text:", key="input", height=150)
|
79 |
|
80 |
-
if st.button("Analyze Sentiment"):
|
81 |
if urdu_text:
|
82 |
with st.spinner("Analyzing sentiment..."):
|
83 |
sentiment = analyze_sentiment(urdu_text)
|
|
|
38 |
def main():
|
39 |
st.set_page_config(page_title="Urdu Sentiment Analysis", page_icon="π΅π°", layout="wide")
|
40 |
|
41 |
+
# Custom CSS with improved color scheme
|
42 |
st.markdown("""
|
43 |
<style>
|
44 |
.main {
|
|
|
45 |
padding: 2rem;
|
46 |
border-radius: 10px;
|
|
|
47 |
}
|
48 |
.title {
|
49 |
+
color: #FF9933;
|
50 |
font-size: 2.5rem;
|
51 |
margin-bottom: 1rem;
|
52 |
+
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
|
53 |
}
|
54 |
.subtitle {
|
55 |
+
color: #6C8A9E;
|
56 |
font-size: 1.2rem;
|
57 |
margin-bottom: 2rem;
|
58 |
}
|
59 |
+
.stTextInput > div > div > input {
|
60 |
+
background-color: rgba(255, 255, 255, 0.1);
|
61 |
+
color: #FFFFFF;
|
62 |
+
}
|
63 |
+
.stTextArea > div > div > textarea {
|
64 |
+
background-color: rgba(255, 255, 255, 0.1);
|
65 |
+
color: #FFFFFF;
|
66 |
}
|
67 |
.result-box {
|
68 |
+
background-color: rgba(255, 255, 255, 0.1);
|
|
|
69 |
border-radius: 5px;
|
70 |
padding: 1rem;
|
71 |
margin-top: 2rem;
|
72 |
}
|
73 |
+
.stAlert {
|
74 |
+
background-color: rgba(255, 255, 255, 0.1);
|
75 |
+
color: #FFFFFF;
|
76 |
+
}
|
77 |
</style>
|
78 |
""", unsafe_allow_html=True)
|
79 |
|
|
|
82 |
|
83 |
urdu_text = st.text_area("Enter Urdu text:", key="input", height=150)
|
84 |
|
85 |
+
if st.button("Analyze Sentiment", key="analyze_button"):
|
86 |
if urdu_text:
|
87 |
with st.spinner("Analyzing sentiment..."):
|
88 |
sentiment = analyze_sentiment(urdu_text)
|