Spaces:
Sleeping
Sleeping
Update app.py
Browse files57 unmodified lines58596061626364651 unmodified line6768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151163 unmodified lines12012112212312412512612712812913013113213313447 unmodified lines18218318418557 unmodified lines# ------------- Custom CSS Styling -------------st.markdown("""<style>/* Remove padding */.block-container { padding-top: 2rem; padding-bottom: 2rem; }/* Title styling */.title {1 unmodified linefont-weight: bold;color: #4A90E2;text-align: center;margin-bottom: 2rem;}/* Chat area container */.chat-container {max-width: 750px;margin: 0 auto;}/* Chat history box */.chat-history {height: 500px;overflow-y: auto;background-color: #F9F9F9;border-radius: 12px;padding: 1rem;border: 1px solid #DDD;margin-bottom: 1rem;}/* Message bubbles */.message-user {background-color: #DDF3FF;padding: 0.8rem;border-radius: 12px;margin-bottom: 0.5rem;}.message-bot {background-color: #E3FFE1;padding: 0.8rem;border-radius: 12px;margin-bottom: 0.5rem;}/* Input field */.stTextInput > div > input {font-size: 1rem;padding: 0.7rem;border-radius: 8px;}/* Button style */.stButton>button {border-radius: 8px;background-color: #4A90E2;color: white;font-size: 1rem;3 unmodified linesbackground-color: #357ABD;}/* Sidebar logo alignment */.sidebar-logo {display: flex;justify-content: center;margin-bottom: 20px;}</style>""", unsafe_allow_html=True)# ------------- Sidebar -------------with st.sidebar:st.markdown("<div class='sidebar-logo'><img src='https://cdn-icons-png.flaticon.com/512/4712/4712027.png' width='100'></div>", unsafe_allow_html=True)47 unmodified linesst.markdown(f"<div class='message-bot'><b>🤖 Bot:</b> {msg['content']}</div>", unsafe_allow_html=True)st.markdown("</div>", unsafe_allow_html=True)st.markdown("</div>", unsafe_allow_html=True) # End chat container57 unmodified lines585960616263646566676869701 unmodified line727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271283 unmodified lines13213313413513613713813914014114214314414514647 unmodified lines19419519619757 unmodified lines# ------------- Custom CSS Styling -------------st.markdown("""<style>/* Remove padding and center content */.block-container {padding-top: 2rem;padding-bottom: 2rem;max-width: 800px;margin: auto;}/* Title styling */.title {1 unmodified linefont-weight: bold;color: #4A90E2;text-align: center;margin-bottom: 1.5rem;}/* Chat container */.chat-history {height: 450px;overflow-y: auto;background-color: #F9F9F9;border-radius: 16px;padding: 1rem;border: 1px solid #DDD;margin-bottom: 1rem;}/* User message styling */.message-user {background-color: #DDF3FF;padding: 0.9rem;border-radius: 12px;margin-bottom: 0.6rem;text-align: left;font-size: 1rem;font-weight: 500;}/* Bot message styling */.message-bot {background-color: #E3FFE1;padding: 0.9rem;border-radius: 12px;margin-bottom: 0.6rem;text-align: left;font-size: 1rem;font-weight: 500;}/* Text input compact styling */.stTextInput > div > input {font-size: 1rem;padding: 0.6rem;border-radius: 10px;margin-bottom: 0.2rem;}/* Hide text input label text */.stTextInput label {display: none;}/* Send button styling */.stButton>button {border-radius: 10px;background-color: #4A90E2;color: white;font-size: 1rem;3 unmodified linesbackground-color: #357ABD;}/* Sidebar image center */.sidebar-logo {text-align: center;margin-bottom: 1rem;}</style>""", unsafe_allow_html=True)# ------------- Sidebar -------------with st.sidebar:st.markdown("<div class='sidebar-logo'><img src='https://cdn-icons-png.flaticon.com/512/4712/4712027.png' width='100'></div>", unsafe_allow_html=True)47 unmodified linesst.markdown(f"<div class='message-bot'><b>🤖 Bot:</b> {msg['content']}</div>", unsafe_allow_html=True)st.markdown("</div>", unsafe_allow_html=True)# End chat container
app.py+39-27