George Rey commited on
Commit ·
09052ae
1
Parent(s): 77c028f
upgrade gradio version
Browse files- .gitignore +1 -0
- app.py +13 -11
- img1A_512x512.jpg +0 -0
- img1B_512x512.jpg +0 -0
.gitignore
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
.idea
|
|
|
|
| 2 |
|
|
|
|
| 1 |
.idea
|
| 2 |
+
__pycache__
|
| 3 |
|
app.py
CHANGED
|
@@ -40,22 +40,24 @@ with gr.Blocks() as demo:
|
|
| 40 |
with gr.Row() as image_pair:
|
| 41 |
with gr.Column() as image_A:
|
| 42 |
image_A = gr.Image(
|
| 43 |
-
|
| 44 |
label="Image A",
|
| 45 |
-
value="
|
| 46 |
-
interactive
|
| 47 |
-
|
| 48 |
-
|
|
|
|
| 49 |
|
| 50 |
-
with gr.Column() as image_B:
|
| 51 |
image_B = gr.Image(
|
| 52 |
-
|
| 53 |
label="Image B",
|
| 54 |
-
value="
|
| 55 |
-
interactive
|
| 56 |
)
|
| 57 |
-
|
| 58 |
-
|
|
|
|
| 59 |
|
| 60 |
if __name__ == "__main__":
|
| 61 |
demo.launch(show_api=False)
|
|
|
|
| 40 |
with gr.Row() as image_pair:
|
| 41 |
with gr.Column() as image_A:
|
| 42 |
image_A = gr.Image(
|
| 43 |
+
height=512, width=512,
|
| 44 |
label="Image A",
|
| 45 |
+
value="img1A_512x512.jpg",
|
| 46 |
+
interactive=False)
|
| 47 |
+
with gr.Row():
|
| 48 |
+
bt_image_A_better = gr.Button(value="Left image is better")
|
| 49 |
+
bt_image_A_better.click(set_image_A_better)
|
| 50 |
|
| 51 |
+
with gr.Column(min_width=512) as image_B:
|
| 52 |
image_B = gr.Image(
|
| 53 |
+
height=512, width=512,
|
| 54 |
label="Image B",
|
| 55 |
+
value="img1A_512x512.jpg",
|
| 56 |
+
interactive=False
|
| 57 |
)
|
| 58 |
+
with gr.Row():
|
| 59 |
+
bt_image_B_better = gr.Button(value="Right image is better",)
|
| 60 |
+
bt_image_B_better.click(set_image_B_better)
|
| 61 |
|
| 62 |
if __name__ == "__main__":
|
| 63 |
demo.launch(show_api=False)
|
img1A_512x512.jpg
ADDED
|
img1B_512x512.jpg
ADDED
|