Update app.py
Browse files
app.py
CHANGED
@@ -1,67 +1,27 @@
|
|
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 |
-
# Custom CSS for dark mode
|
7 |
-
st.markdown(
|
8 |
-
"""
|
9 |
-
<style>
|
10 |
-
body {
|
11 |
-
background-color: #1e1e1e;
|
12 |
-
color: #ffffff;
|
13 |
-
}
|
14 |
-
.stButton button {
|
15 |
-
background-color: #4CAF50;
|
16 |
-
color: white;
|
17 |
-
}
|
18 |
-
.stTextInput input {
|
19 |
-
background-color: #333333;
|
20 |
-
color: white;
|
21 |
-
}
|
22 |
-
.stMarkdown {
|
23 |
-
color: #ffffff;
|
24 |
-
}
|
25 |
-
.footer-logo img {
|
26 |
-
width: 100px; /* Adjust width as necessary */
|
27 |
-
}
|
28 |
-
</style>
|
29 |
-
""",
|
30 |
-
unsafe_allow_html=True
|
31 |
-
)
|
32 |
# Define function to handle user input and display chatbot response
|
33 |
def chatbot_response(user_input):
|
34 |
response = qa.run(user_input)
|
35 |
return response
|
36 |
|
|
|
37 |
# Create columns for logos
|
38 |
-
col1, col2, col3 = st.columns([1,
|
39 |
|
40 |
with col1:
|
41 |
-
st.image("Design 3_2 (1).png", width=
|
42 |
|
43 |
with col2:
|
44 |
-
st.markdown("
|
45 |
-
st.markdown("
|
46 |
|
47 |
with col3:
|
48 |
-
st.image("Altereo logo 2023 original - eau et territoires durables.png", width=
|
|
|
|
|
49 |
|
50 |
# Input and button for user interaction
|
51 |
user_input = st.text_input("You:", "")
|
52 |
-
submit_button = st.button("Send 📨")
|
53 |
-
|
54 |
-
# Handle user input
|
55 |
-
if submit_button:
|
56 |
-
if user_input.strip() != "":
|
57 |
-
bot_response = chatbot_response(user_input)
|
58 |
-
st.markdown("### You:")
|
59 |
-
st.markdown(f"> {user_input}")
|
60 |
-
st.markdown("### Bot:")
|
61 |
-
st.markdown(f"> {bot_response}")
|
62 |
-
else:
|
63 |
-
st.warning("⚠️ Please enter a message.")
|
64 |
|
65 |
# Motivational quote at the bottom
|
66 |
st.markdown("---")
|
67 |
-
st.markdown("*La collaboration est la clé du succès. Chaque question trouve sa réponse, chaque défi devient une opportunité.*")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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([1, 3, 1])
|
9 |
|
10 |
with col1:
|
11 |
+
st.image("Design 3_2 (1).png", width=100) # Adjust image path and size as needed
|
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=100) # Adjust image path and size as needed
|
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("---")
|
27 |
+
st.markdown("*La collaboration est la clé du succès. Chaque question trouve sa réponse, chaque défi devient une opportunité.*")
|