Spaces:
Runtime error
Runtime error
ElLokoAkrata
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from PIL import Image
|
|
5 |
def elo_update(winner_elo, loser_elo, k=32):
|
6 |
expected_score_winner = 1 / (1 + 10 ** ((loser_elo - winner_elo) / 400))
|
7 |
new_winner_elo = winner_elo + k * (1 - expected_score_winner)
|
8 |
-
new_loser_elo =
|
9 |
return new_winner_elo, new_loser_elo
|
10 |
|
11 |
# Inicializa puntuaciones Elo
|
@@ -63,9 +63,9 @@ with gr.Blocks() as demo:
|
|
63 |
gr.Markdown("# Akelarre Generativo (DALL-E 3 vs MJ 6.1 vs Flux 1)")
|
64 |
gr.Markdown("### Vota por la imagen generada por IA que prefieras. La puntuaci贸n Elo se actualizar谩 en tiempo real.")
|
65 |
|
66 |
-
dalle3_img = gr.Image(value=dalle3_image, label="DALL-E 3", interactive=False)
|
67 |
-
midjourney_img = gr.Image(value=midjourney_image, label="Midjourney 6.1", interactive=False)
|
68 |
-
flux_img = gr.Image(value=flux_image, label="Flux", interactive=False)
|
69 |
|
70 |
with gr.Row():
|
71 |
first_choice = gr.Dropdown(["DALL-E 3", "Midjourney 6.1", "Flux"], label="Primera Favorita")
|
|
|
5 |
def elo_update(winner_elo, loser_elo, k=32):
|
6 |
expected_score_winner = 1 / (1 + 10 ** ((loser_elo - winner_elo) / 400))
|
7 |
new_winner_elo = winner_elo + k * (1 - expected_score_winner)
|
8 |
+
new_loser_elo = loser_elo + k * (0 - (1 - expected_score_winner))
|
9 |
return new_winner_elo, new_loser_elo
|
10 |
|
11 |
# Inicializa puntuaciones Elo
|
|
|
63 |
gr.Markdown("# Akelarre Generativo (DALL-E 3 vs MJ 6.1 vs Flux 1)")
|
64 |
gr.Markdown("### Vota por la imagen generada por IA que prefieras. La puntuaci贸n Elo se actualizar谩 en tiempo real.")
|
65 |
|
66 |
+
dalle3_img = gr.Image(value=dalle3_image, label="DALL-E 3", interactive=False, height=512, width=512)
|
67 |
+
midjourney_img = gr.Image(value=midjourney_image, label="Midjourney 6.1", interactive=False, height=512, width=512)
|
68 |
+
flux_img = gr.Image(value=flux_image, label="Flux", interactive=False, height=512, width=512)
|
69 |
|
70 |
with gr.Row():
|
71 |
first_choice = gr.Dropdown(["DALL-E 3", "Midjourney 6.1", "Flux"], label="Primera Favorita")
|