Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -61,15 +61,18 @@ if st.button("Start Meme Battle"):
|
|
61 |
score1 = score_meme(image1, caption1)
|
62 |
score2 = score_meme(image2, caption2)
|
63 |
|
64 |
-
# Display Meme 1
|
65 |
-
st.
|
66 |
-
st.image(image1, caption=f"Caption: {caption1}")
|
67 |
-
st.write(f"AI Score: {score1:.2f}")
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
# Determine the winner
|
75 |
if score1 > score2:
|
@@ -78,3 +81,4 @@ if st.button("Start Meme Battle"):
|
|
78 |
st.write("π **Meme 2 Wins!**")
|
79 |
else:
|
80 |
st.write("π€ **It's a tie!**")
|
|
|
|
61 |
score1 = score_meme(image1, caption1)
|
62 |
score2 = score_meme(image2, caption2)
|
63 |
|
64 |
+
# Display Meme 1 and Meme 2 side by side
|
65 |
+
col1, col2 = st.columns(2)
|
|
|
|
|
66 |
|
67 |
+
with col1:
|
68 |
+
st.write("#### Meme 1")
|
69 |
+
st.image(image1, caption=f"Caption: {caption1}")
|
70 |
+
st.write(f"AI Score: {score1:.2f}")
|
71 |
+
|
72 |
+
with col2:
|
73 |
+
st.write("#### Meme 2")
|
74 |
+
st.image(image2, caption=f"Caption: {caption2}")
|
75 |
+
st.write(f"AI Score: {score2:.2f}")
|
76 |
|
77 |
# Determine the winner
|
78 |
if score1 > score2:
|
|
|
81 |
st.write("π **Meme 2 Wins!**")
|
82 |
else:
|
83 |
st.write("π€ **It's a tie!**")
|
84 |
+
|