mouseland commited on
Commit
423e8f1
·
verified ·
1 Parent(s): 16b034a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -226,7 +226,7 @@ def upload_file(filepath):
226
  img = normalize99(img)
227
  img = np.clip(img, 0, 1)
228
 
229
- return img
230
 
231
  with gr.Blocks(title = "Hello",
232
  css=".gradio-container {background:purple;}") as demo:
@@ -264,7 +264,7 @@ with gr.Blocks(title = "Hello",
264
  sample_list.append("samples/img%0.2d.png"%j)
265
  gr.Examples(sample_list, inputs=input_image, examples_per_page=25)
266
 
267
- up_btn.upload(upload_file, up_btn, input_image)
268
  send_btn.click(cellpose_segment, [up_btn, resize], [img_outlines, img_overlay, flows, down_btn, down_btn2])
269
 
270
  #down_btn.click(download_function, None, [down_btn, down_btn2])
 
226
  img = normalize99(img)
227
  img = np.clip(img, 0, 1)
228
 
229
+ return img, filepath
230
 
231
  with gr.Blocks(title = "Hello",
232
  css=".gradio-container {background:purple;}") as demo:
 
264
  sample_list.append("samples/img%0.2d.png"%j)
265
  gr.Examples(sample_list, inputs=input_image, examples_per_page=25)
266
 
267
+ up_btn.upload(upload_file, up_btn, [input_image, up_btn])
268
  send_btn.click(cellpose_segment, [up_btn, resize], [img_outlines, img_overlay, flows, down_btn, down_btn2])
269
 
270
  #down_btn.click(download_function, None, [down_btn, down_btn2])