qijie.wei commited on
Commit
f68c628
·
1 Parent(s): 6777aa2
Files changed (1) hide show
  1. app.py +16 -10
app.py CHANGED
@@ -15,14 +15,20 @@ def main(image):
15
  out = inference_engine.inference(image, "CFP")
16
  return out
17
 
18
- interface = gr.Interface(
19
- fn=main,
20
- inputs=[
21
- gr.Image(type="numpy"),
22
- ],
23
- outputs=gr.Image(type="numpy"),
24
- title="[ICASSP 2025] Broad domain retinal vessel segmentation",
25
- description=""
26
- )
 
 
 
 
 
 
27
 
28
- interface.launch()
 
15
  out = inference_engine.inference(image, "CFP")
16
  return out
17
 
18
+ with gr.Blocks() as demo:
19
+ gr.Markdown("# [ICASSP 2025] Broad domain retinal vessel segmentation")
20
+
21
+ with gr.Row():
22
+ with gr.Column():
23
+ image_input = gr.Image(type="numpy", label="Input Image")
24
+ with gr.Column():
25
+ image_output = gr.Image(type="numpy", label="Output")
26
+
27
+ # 当图像输入发生变化时自动触发推理
28
+ image_input.change(
29
+ fn=main,
30
+ inputs=image_input,
31
+ outputs=image_output
32
+ )
33
 
34
+ demo.launch()