test / app.py
mery22's picture
Update app.py
ec33053 verified
raw
history blame
No virus
1.46 kB
import streamlit as st
# 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
# Streamlit components
st.markdown("### 🤖 ALTER-IA BOT, ton assistant virtuel de tous les jours")
st.markdown(" Votre Réponse à Chaque Défi Méthodologique 📈")
# Create columns for logos
col1, col2, col3 = st.columns([2, 3, 2])
with col1:
st.image("Design 3_2 (1).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
# Input and button for user interaction
user_input = st.text_input("You:", "")
submit_button = st.button("Send 📨")
# Handle user input
if submit_button:
if user_input.strip() != "":
bot_response = chatbot_response(user_input)
st.markdown("### You:")
st.markdown(f"> {user_input}")
st.markdown("### Bot:")
st.markdown(f"> {bot_response}")
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é.*")