import streamlit as st from PIL import Image # Streamlit interface with improved aesthetics st.set_page_config(page_title="Chatbot Interface", page_icon="🤖") # Define function to handle user input and display chatbot response def chatbot_response(user_input): response = qa.run(user_input) return response # Custom CSS for dark mode and centering st.markdown( """ """, unsafe_allow_html=True ) # Create columns for logos col1, col2, col3 = st.columns([2, 3, 2]) with col1: st.image("Design 3_22.png", width=150, use_column_width=True) # Adjust image path and size as needed with col3: st.image("Altereo logo 2023 original - eau et territoires durables.png", width=150, use_column_width=True) # Adjust image path and size as needed # Centered title and slogan st.markdown('

🤖 ALTER-IA BOT,

', unsafe_allow_html=True) st.markdown('Votre Réponse à Chaque Défi Méthodologique 📈', unsafe_allow_html=True) # Input and button for user interaction user_input = st.text_input("You:", "", placeholder="Type your question here...") # Output field with icon if st.button: if user_input.strip() != "": bot_response = chatbot_response(user_input) st.markdown( f"""
Bot Icon
""", unsafe_allow_html=True ) else: st.warning("⚠️ Please enter a message.") # Motivational quote at the bottom st.markdown("---") st.markdown("*La collaboration est la clé du succès. Chaque question trouve sa réponse, chaque défi devient une opportunité.*") # Display icons and text input/output user_icon = "vector-users-icon.jpg" # Replace with your user icon path bot_icon = "robot-chatbot-icon-sign-free-vector.jpg" # Replace with your bot icon path # Input field with icon st.markdown( f"""
User Icon
""", unsafe_allow_html=True )