Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,15 @@ def generate_caption_emotion_and_people_count(image):
|
|
62 |
return caption, emotions, count
|
63 |
def main():
|
64 |
# Interface Streamlit
|
65 |
-
st.title("Analyse d'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
# Upload d'image
|
68 |
uploaded_image = st.file_uploader("Choisissez une image...", type=["jpg", "jpeg", "png"])
|
@@ -78,8 +86,15 @@ def main():
|
|
78 |
# result = generate_caption_emotion_and_people_count(image)
|
79 |
# st.write(result)
|
80 |
# Bouton pour lancer l'analyse
|
|
|
81 |
if st.button('Analyser l\'image'):
|
82 |
caption, emotions, count = generate_caption_emotion_and_people_count(image)
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
with st.expander("Voir les résultats !!"):
|
84 |
st.write(f"**Légende**: {caption}")
|
85 |
st.write(f"**Émotions**: {emotions}")
|
|
|
62 |
return caption, emotions, count
|
63 |
def main():
|
64 |
# Interface Streamlit
|
65 |
+
st.title("Analyse d'Affluence Événementielle via la Détection d'Objets")
|
66 |
+
|
67 |
+
# Présentation des objectifs du projet
|
68 |
+
st.write("Ce projet vise à :")
|
69 |
+
st.markdown("""
|
70 |
+
- Compter le nombre de participants.
|
71 |
+
- Analyser leurs émotions.
|
72 |
+
- Générer une description contextuelle de l'événement.
|
73 |
+
""")
|
74 |
|
75 |
# Upload d'image
|
76 |
uploaded_image = st.file_uploader("Choisissez une image...", type=["jpg", "jpeg", "png"])
|
|
|
86 |
# result = generate_caption_emotion_and_people_count(image)
|
87 |
# st.write(result)
|
88 |
# Bouton pour lancer l'analyse
|
89 |
+
|
90 |
if st.button('Analyser l\'image'):
|
91 |
caption, emotions, count = generate_caption_emotion_and_people_count(image)
|
92 |
+
result_md = f"""
|
93 |
+
**Caption**: {caption}
|
94 |
+
**Emotions**: {emotions}
|
95 |
+
**Number of People**: {count}
|
96 |
+
"""
|
97 |
+
st.markdown(result_md)
|
98 |
with st.expander("Voir les résultats !!"):
|
99 |
st.write(f"**Légende**: {caption}")
|
100 |
st.write(f"**Émotions**: {emotions}")
|