Update app.py
Browse files
app.py
CHANGED
|
@@ -1,21 +1,40 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
-
# Streamlit interface
|
| 4 |
-
st.
|
| 5 |
|
| 6 |
# Define function to handle user input and display chatbot response
|
| 7 |
def chatbot_response(user_input):
|
| 8 |
-
|
| 9 |
print("xxx")
|
| 10 |
|
| 11 |
# Streamlit components
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
user_input = st.text_input("You:", "")
|
| 13 |
-
submit_button = st.button("Send")
|
| 14 |
|
| 15 |
# Handle user input
|
| 16 |
if submit_button:
|
| 17 |
if user_input.strip() != "":
|
| 18 |
bot_response = chatbot_response(user_input)
|
| 19 |
-
st.
|
|
|
|
|
|
|
|
|
|
| 20 |
else:
|
| 21 |
-
st.warning("Please enter a message.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
+
# Streamlit interface with improved aesthetics
|
| 4 |
+
st.set_page_config(page_title="Chatbot Interface", page_icon="🤖")
|
| 5 |
|
| 6 |
# Define function to handle user input and display chatbot response
|
| 7 |
def chatbot_response(user_input):
|
|
|
|
| 8 |
print("xxx")
|
| 9 |
|
| 10 |
# Streamlit components
|
| 11 |
+
st.markdown("### 🤖 ALTER-IA BOT, ton assistant virtuel de tous les jours")
|
| 12 |
+
st.markdown("##### Votre Réponse à Chaque Défi Méthodologique 📈")
|
| 13 |
+
|
| 14 |
+
# Create columns for logos
|
| 15 |
+
col1, col2, col3 = st.columns([-1, 6, 1])
|
| 16 |
+
|
| 17 |
+
with col1:
|
| 18 |
+
st.image("Design 3_2 (1).png", width= 200, use_column_width=True) # Adjust image path and size as needed
|
| 19 |
+
|
| 20 |
+
with col3:
|
| 21 |
+
st.image("Altereo logo 2023 original - eau et territoires durables.png", width= 200, use_column_width=True) # Adjust image path and size as needed
|
| 22 |
+
|
| 23 |
+
# Input and button for user interaction
|
| 24 |
user_input = st.text_input("You:", "")
|
| 25 |
+
submit_button = st.button("Send 📨")
|
| 26 |
|
| 27 |
# Handle user input
|
| 28 |
if submit_button:
|
| 29 |
if user_input.strip() != "":
|
| 30 |
bot_response = chatbot_response(user_input)
|
| 31 |
+
st.markdown("### You:")
|
| 32 |
+
st.markdown(f"> {user_input}")
|
| 33 |
+
st.markdown("### Bot:")
|
| 34 |
+
st.markdown(f"> {bot_response}")
|
| 35 |
else:
|
| 36 |
+
st.warning("⚠️ Please enter a message.")
|
| 37 |
+
|
| 38 |
+
# Motivational quote at the bottom
|
| 39 |
+
st.markdown("---")
|
| 40 |
+
st.markdown("*La collaboration est la clé du succès. Chaque question trouve sa réponse, chaque défi devient une opportunité.*")
|