Update app.py
Browse files
app.py
CHANGED
@@ -1,26 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# Define function to handle user input and display chatbot response
|
2 |
def chatbot_response(user_input):
|
3 |
response = qa.run(user_input)
|
4 |
return response
|
5 |
|
|
|
|
|
|
|
6 |
|
7 |
# Create columns for logos
|
8 |
-
col1, col2, col3 = st.columns([
|
9 |
|
10 |
with col1:
|
11 |
-
st.image("Design 3_2 (1).png", width=
|
12 |
-
|
13 |
-
with col2:
|
14 |
-
st.markdown("# 🤖 ALTER-IA BOT")
|
15 |
-
st.markdown(" Votre Réponse à Chaque Défi Méthodologique 📈")
|
16 |
|
17 |
with col3:
|
18 |
-
st.image("Altereo logo 2023 original - eau et territoires durables.png", width=
|
19 |
-
|
20 |
-
|
21 |
|
22 |
# Input and button for user interaction
|
23 |
user_input = st.text_input("You:", "")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
# Motivational quote at the bottom
|
26 |
st.markdown("---")
|
|
|
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 |
response = qa.run(user_input)
|
9 |
return response
|
10 |
|
11 |
+
# Streamlit components
|
12 |
+
st.markdown("### 🤖 ALTER-IA BOT, ton assistant virtuel de tous les jours")
|
13 |
+
st.markdown(" Votre Réponse à Chaque Défi Méthodologique 📈")
|
14 |
|
15 |
# Create columns for logos
|
16 |
+
col1, col2, col3 = st.columns([2, 3, 2])
|
17 |
|
18 |
with col1:
|
19 |
+
st.image("Design 3_2 (1).png", width= 150, use_column_width=True) # Adjust image path and size as needed
|
|
|
|
|
|
|
|
|
20 |
|
21 |
with col3:
|
22 |
+
st.image("Altereo logo 2023 original - eau et territoires durables.png", width= 150, use_column_width=True) # Adjust image path and size as needed
|
|
|
|
|
23 |
|
24 |
# Input and button for user interaction
|
25 |
user_input = st.text_input("You:", "")
|
26 |
+
submit_button = st.button("Send 📨")
|
27 |
+
|
28 |
+
# Handle user input
|
29 |
+
if submit_button:
|
30 |
+
if user_input.strip() != "":
|
31 |
+
bot_response = chatbot_response(user_input)
|
32 |
+
st.markdown("### You:")
|
33 |
+
st.markdown(f"> {user_input}")
|
34 |
+
st.markdown("### Bot:")
|
35 |
+
st.markdown(f"> {bot_response}")
|
36 |
+
else:
|
37 |
+
st.warning("⚠️ Please enter a message.")
|
38 |
|
39 |
# Motivational quote at the bottom
|
40 |
st.markdown("---")
|