Skip to content

Commit

Permalink
update ui
Browse files Browse the repository at this point in the history
  • Loading branch information
JiauZhang committed May 22, 2023
1 parent af54a0e commit 18bca74
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def change_device(sender, app_data):
generator = generator.to(app_data)
device = app_data

width, height = 200, 200
width, height = 240, 200
posx, posy = 0, 0
with dpg.window(
label='Network & Latent', width=width, height=height, pos=(posx, posy),
Expand Down Expand Up @@ -72,7 +72,15 @@ def cancel_cb(sender, app_data):
)

dpg.add_text('latent', pos=(5, 60))
dpg.add_button(label="generate", pos=(5, 80), callback=generate_image)
dpg.add_input_int(label='seed', width=100, pos=(70, 60))
dpg.add_input_float(
label='step size', width=54, pos=(70, 80), step=-1, default_value=0.002,
)
dpg.add_button(label="reset", width=54, pos=(70, 100), callback=None)
dpg.add_radio_button(
items=('w', 'w+'), pos=(130, 100), horizontal=True, default_value='w+',
)
dpg.add_button(label="generate", pos=(70, 120), callback=generate_image)

posy += height + 2
with dpg.window(
Expand Down Expand Up @@ -109,7 +117,7 @@ def select_point(sender, app_data):
posx, posy = 2 + width, 0
with dpg.window(
label='Image', pos=(posx, posy), tag='Image Win',
no_move=True, no_close=True, no_collapse=True, autosize=True,
no_move=True, no_close=True, no_collapse=True, no_resize=True,
):
dpg.add_image("image", show=True, tag='image_data', pos=(10, 30))

Expand Down

0 comments on commit 18bca74

Please sign in to comment.