DarianT commited on
Commit
15b4f9a
·
1 Parent(s): eea3399

Update lists and default values

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -16,6 +16,7 @@ pipe = pipe.to(device)
16
 
17
  backgrounds_list = ["forest", "city street", "beach", "office", "bus", "laboratory", "factory", "construction site", "hospital", "night club", ""]
18
  poses_list = ["portrait", "side-portrait"]
 
19
 
20
  gender_dict = {"ID_0": "male"}
21
  MAX_SEED = np.iinfo(np.int32).max
@@ -71,8 +72,8 @@ with gr.Blocks(css=css) as demo:
71
  with gr.Row():
72
  which_id = gr.Dropdown(
73
  label="Identity",
74
- choices=backgrounds_list,
75
- value="Jungle",
76
  )
77
 
78
  background = gr.Dropdown(
@@ -84,7 +85,7 @@ with gr.Blocks(css=css) as demo:
84
  pose = gr.Dropdown(
85
  label="Pose",
86
  choices=poses_list,
87
- value="Portrait",
88
  )
89
 
90
  run_button = gr.Button("Run", scale=0, variant="primary")
@@ -145,11 +146,9 @@ with gr.Blocks(css=css) as demo:
145
 
146
  gr.Examples(
147
  examples=[
148
- ["Jungle", "Running"],
149
- ["Space Station", "Flying"],
150
- ["Urban City", "Sitting"],
151
  ],
152
- inputs=[background, pose],
153
  )
154
 
155
  gr.on(
 
16
 
17
  backgrounds_list = ["forest", "city street", "beach", "office", "bus", "laboratory", "factory", "construction site", "hospital", "night club", ""]
18
  poses_list = ["portrait", "side-portrait"]
19
+ id_list = ["ID_0", "ID_1", "ID_2", "ID_3", "ID_4", "ID_5"]
20
 
21
  gender_dict = {"ID_0": "male"}
22
  MAX_SEED = np.iinfo(np.int32).max
 
72
  with gr.Row():
73
  which_id = gr.Dropdown(
74
  label="Identity",
75
+ choices=id_list,
76
+ value=id_list[0],
77
  )
78
 
79
  background = gr.Dropdown(
 
85
  pose = gr.Dropdown(
86
  label="Pose",
87
  choices=poses_list,
88
+ value=poses_list[0],
89
  )
90
 
91
  run_button = gr.Button("Run", scale=0, variant="primary")
 
146
 
147
  gr.Examples(
148
  examples=[
149
+ [id_list[0], backgrounds_list[0], poses_list[0], "A beautiful photo of a person", 0, False, 512, 512, 7.5, 50],
 
 
150
  ],
151
+ inputs=[which_id, background, pose],
152
  )
153
 
154
  gr.on(