Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,21 +12,21 @@ def check(img_main, img_1, img_2, model_idx):
|
|
12 |
return result
|
13 |
|
14 |
with gr.Blocks() as demo:
|
15 |
-
gr.Markdown('
|
16 |
-
img_main = gr.Text(label='
|
17 |
|
18 |
-
gr.Markdown('
|
19 |
-
img_1 = gr.Text(label='
|
20 |
-
img_2 = gr.Text(label='
|
21 |
|
22 |
-
gr.Markdown('
|
23 |
-
model = gr.Dropdown([m.name for m in models], label='
|
24 |
|
25 |
gallery = gr.Gallery(
|
26 |
-
label="
|
27 |
).style(grid=[2], height="auto")
|
28 |
|
29 |
-
submit_btn = gr.Button('
|
30 |
submit_btn.click(fn=check,inputs=[img_main, img_1, img_2, model], outputs=gallery)
|
31 |
|
32 |
demo.launch()
|
|
|
12 |
return result
|
13 |
|
14 |
with gr.Blocks() as demo:
|
15 |
+
gr.Markdown('بررسی شباهت عکس ها')
|
16 |
+
img_main = gr.Text(label='عکس اصلی', placeholder='https://myimage.jpg')
|
17 |
|
18 |
+
gr.Markdown('عکس های مقایسه')
|
19 |
+
img_1 = gr.Text(label='عکس اول', placeholder='https://myimage_1.jpg')
|
20 |
+
img_2 = gr.Text(label='عکس دوم', placeholder='https://myimage_2.jpg')
|
21 |
|
22 |
+
gr.Markdown('انتخاب مدل')
|
23 |
+
model = gr.Dropdown([m.name for m in models], label='مدل', type='index')
|
24 |
|
25 |
gallery = gr.Gallery(
|
26 |
+
label="عکس های تولیدی", show_label=False, elem_id="gallery"
|
27 |
).style(grid=[2], height="auto")
|
28 |
|
29 |
+
submit_btn = gr.Button('بررسی شباهت')
|
30 |
submit_btn.click(fn=check,inputs=[img_main, img_1, img_2, model], outputs=gallery)
|
31 |
|
32 |
demo.launch()
|