tastelikefeet commited on
Commit
ddfd056
1 Parent(s): a073589

revert changes

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -210,7 +210,7 @@ escaped_value = json.dumps(value)
210
 
211
  with block:
212
  block.load(fn=None,
213
- js=f"""() => {{
214
  const script = document.createElement("script");
215
  const text = document.createTextNode({escaped_value});
216
  script.appendChild(text);
@@ -295,12 +295,12 @@ with block:
295
  y = gr.Slider(label='y', value=0.4, minimum=0.0, maximum=1.0, step=0.0001, elem_id=f'MD-t2i-{i}-y', visible=False)
296
  w = gr.Slider(label='w', value=0.2, minimum=0.0, maximum=1.0, step=0.0001, elem_id=f'MD-t2i-{i}-w', visible=False)
297
  h = gr.Slider(label='h', value=0.2, minimum=0.0, maximum=1.0, step=0.0001, elem_id=f'MD-t2i-{i}-h', visible=False)
298
- x.change(fn=None, inputs=x, outputs=x, js=f'v => onBoxChange({is_t2i}, {i}, "x", v)', show_progress=False, queue=False)
299
- y.change(fn=None, inputs=y, outputs=y, js=f'v => onBoxChange({is_t2i}, {i}, "y", v)', show_progress=False, queue=False)
300
- w.change(fn=None, inputs=w, outputs=w, js=f'v => onBoxChange({is_t2i}, {i}, "w", v)', show_progress=False, queue=False)
301
- h.change(fn=None, inputs=h, outputs=h, js=f'v => onBoxChange({is_t2i}, {i}, "h", v)', show_progress=False, queue=False)
302
 
303
- e.change(fn=None, inputs=e, outputs=e, js=f'e => onBoxEnableClick({is_t2i}, {i}, e)', queue=False)
304
  rect_cb_list.extend([e])
305
  rect_xywh_list.extend([x, y, w, h])
306
 
 
210
 
211
  with block:
212
  block.load(fn=None,
213
+ _js=f"""() => {{
214
  const script = document.createElement("script");
215
  const text = document.createTextNode({escaped_value});
216
  script.appendChild(text);
 
295
  y = gr.Slider(label='y', value=0.4, minimum=0.0, maximum=1.0, step=0.0001, elem_id=f'MD-t2i-{i}-y', visible=False)
296
  w = gr.Slider(label='w', value=0.2, minimum=0.0, maximum=1.0, step=0.0001, elem_id=f'MD-t2i-{i}-w', visible=False)
297
  h = gr.Slider(label='h', value=0.2, minimum=0.0, maximum=1.0, step=0.0001, elem_id=f'MD-t2i-{i}-h', visible=False)
298
+ x.change(fn=None, inputs=x, outputs=x, _js=f'v => onBoxChange({is_t2i}, {i}, "x", v)', show_progress=False, queue=False)
299
+ y.change(fn=None, inputs=y, outputs=y, _js=f'v => onBoxChange({is_t2i}, {i}, "y", v)', show_progress=False, queue=False)
300
+ w.change(fn=None, inputs=w, outputs=w, _js=f'v => onBoxChange({is_t2i}, {i}, "w", v)', show_progress=False, queue=False)
301
+ h.change(fn=None, inputs=h, outputs=h, _js=f'v => onBoxChange({is_t2i}, {i}, "h", v)', show_progress=False, queue=False)
302
 
303
+ e.change(fn=None, inputs=e, outputs=e, _js=f'e => onBoxEnableClick({is_t2i}, {i}, e)', queue=False)
304
  rect_cb_list.extend([e])
305
  rect_xywh_list.extend([x, y, w, h])
306