Spaces:
Build error
Build error
Update app.py
Browse files37 unmodified lines383940414243444546474849505152535455565758596061626364656667686970717273742 unmodified lines7778798081828337 unmodified linesdef main():st.set_page_config(page_title="Urdu Sentiment Analysis", page_icon="🇵🇰", layout="wide")st.markdown("""<style>.main {background-color: #f0f2f6;padding: 2rem;border-radius: 10px;box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);}.title {color: #1e3a8a;font-size: 2.5rem;margin-bottom: 1rem;}.subtitle {color: #4a5568;font-size: 1.2rem;margin-bottom: 2rem;}.input-box {background-color: white;border: 1px solid #e2e8f0;border-radius: 5px;padding: 1rem;}.result-box {background-color: white;border: 1px solid #e2e8f0;border-radius: 5px;padding: 1rem;margin-top: 2rem;}</style>""", unsafe_allow_html=True)2 unmodified linesurdu_text = st.text_area("Enter Urdu text:", key="input", height=150)if st.button("Analyze Sentiment"):if urdu_text:with st.spinner("Analyzing sentiment..."):sentiment = analyze_sentiment(urdu_text)37 unmodified lines3839404142434445464748495051525354555657585960616263646566676869707172737475767778792 unmodified lines8283848586878837 unmodified linesdef main():st.set_page_config(page_title="Urdu Sentiment Analysis", page_icon="🇵🇰", layout="wide")# Custom CSS with improved color schemest.markdown("""<style>.main {padding: 2rem;border-radius: 10px;}.title {color: #FF9933;font-size: 2.5rem;margin-bottom: 1rem;text-shadow: 2px 2px 4px rgba(0,0,0,0.1);}.subtitle {color: #6C8A9E;font-size: 1.2rem;margin-bottom: 2rem;}.stTextInput > div > div > input {background-color: rgba(255, 255, 255, 0.1);color: #FFFFFF;}.stTextArea > div > div > textarea {background-color: rgba(255, 255, 255, 0.1);color: #FFFFFF;}.result-box {background-color: rgba(255, 255, 255, 0.1);border-radius: 5px;padding: 1rem;margin-top: 2rem;}.stAlert {background-color: rgba(255, 255, 255, 0.1);color: #FFFFFF;}</style>""", unsafe_allow_html=True)2 unmodified linesurdu_text = st.text_area("Enter Urdu text:", key="input", height=150)if st.button("Analyze Sentiment", key="analyze_button"):if urdu_text:with st.spinner("Analyzing sentiment..."):sentiment = analyze_sentiment(urdu_text)
app.py+17-12