SeyedAli commited on
Commit
5bf511d
1 Parent(s): 9c7338a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
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('Checking Image Similarity')
16
- img_main = gr.Text(label='Main Image', placeholder='https://myimage.jpg')
17
 
18
- gr.Markdown('Images to check')
19
- img_1 = gr.Text(label='1st Image', placeholder='https://myimage_1.jpg')
20
- img_2 = gr.Text(label='2nd Image', placeholder='https://myimage_2.jpg')
21
 
22
- gr.Markdown('Choose the model')
23
- model = gr.Dropdown([m.name for m in models], label='Model', type='index')
24
 
25
  gallery = gr.Gallery(
26
- label="Generated images", show_label=False, elem_id="gallery"
27
  ).style(grid=[2], height="auto")
28
 
29
- submit_btn = gr.Button('Check Similarity')
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()