neojack commited on
Commit
ad90ea7
Β·
verified Β·
1 Parent(s): 42d703c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -8
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.write("#### Meme 1")
66
- st.image(image1, caption=f"Caption: {caption1}")
67
- st.write(f"AI Score: {score1:.2f}")
68
 
69
- # Display Meme 2
70
- st.write("#### Meme 2")
71
- st.image(image2, caption=f"Caption: {caption2}")
72
- st.write(f"AI Score: {score2:.2f}")
 
 
 
 
 
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
+