root commited on
Commit
d7755cb
1 Parent(s): 77e1f1c

add img choice

Browse files
Files changed (1) hide show
  1. ui_functions.py +2 -2
ui_functions.py CHANGED
@@ -6,10 +6,10 @@ import base64
6
  import re
7
 
8
  def change_img_choices(sample_size):
9
- choices = ['图片1(img1)']
10
  for i in range(sample_size):
11
  choices.append(
12
- '图片{}(img_{})'.format(i+1,i+1)
13
  )
14
  update_choices = gr.update(choices=choices)
15
  return update_choices
 
6
  import re
7
 
8
  def change_img_choices(sample_size):
9
+ choices = []
10
  for i in range(sample_size):
11
  choices.append(
12
+ '图片{}(img{})'.format(i+1,i+1)
13
  )
14
  update_choices = gr.update(choices=choices)
15
  return update_choices