Spaces:
Runtime error
Runtime error
Xu Ma
commited on
Commit
·
ecd7a1c
1
Parent(s):
ed7b670
Update app.py
Browse files
app.py
CHANGED
@@ -108,7 +108,7 @@ def app_experiment_change(experiment_id):
|
|
108 |
cfg_arg = parse_args()
|
109 |
temp_image = np.random.rand(224,224,3)
|
110 |
temp_text = "start"
|
111 |
-
def run_live(img, experiment_id, cfg_arg=cfg_arg):
|
112 |
experiment = app_experiment_change(experiment_id)
|
113 |
cfg_arg.target = img
|
114 |
cfg_arg.experiment = experiment
|
@@ -286,6 +286,9 @@ def run_live(img, experiment_id, cfg_arg=cfg_arg):
|
|
286 |
def main(args):
|
287 |
gr.close_all()
|
288 |
# -------------------Inputs-------------------
|
|
|
|
|
|
|
289 |
inputs_img = gr.inputs.Image(type="pil", label="Input Image")
|
290 |
experiment_id = gr.inputs.Radio(
|
291 |
choices=[
|
@@ -297,6 +300,7 @@ def main(args):
|
|
297 |
|
298 |
# inputs
|
299 |
inputs = [
|
|
|
300 |
inputs_img, # input image
|
301 |
experiment_id, # path adding scheduler
|
302 |
]
|
|
|
108 |
cfg_arg = parse_args()
|
109 |
temp_image = np.random.rand(224,224,3)
|
110 |
temp_text = "start"
|
111 |
+
def run_live(slide_value, img, experiment_id, cfg_arg=cfg_arg):
|
112 |
experiment = app_experiment_change(experiment_id)
|
113 |
cfg_arg.target = img
|
114 |
cfg_arg.experiment = experiment
|
|
|
286 |
def main(args):
|
287 |
gr.close_all()
|
288 |
# -------------------Inputs-------------------
|
289 |
+
inputs_update = gr.inputs.Slider(
|
290 |
+
label="Please randomly slide the button to update vectorized output",
|
291 |
+
default=50,maximum=100,minimum=1,step=1),
|
292 |
inputs_img = gr.inputs.Image(type="pil", label="Input Image")
|
293 |
experiment_id = gr.inputs.Radio(
|
294 |
choices=[
|
|
|
300 |
|
301 |
# inputs
|
302 |
inputs = [
|
303 |
+
inputs_update,
|
304 |
inputs_img, # input image
|
305 |
experiment_id, # path adding scheduler
|
306 |
]
|