Spaces:
Sleeping
Sleeping
amazinghaha
commited on
Commit
•
2860a44
1
Parent(s):
deb5500
Update app.py
Browse files
app.py
CHANGED
@@ -17,9 +17,9 @@ def load_from_pkl(load_path):
|
|
17 |
|
18 |
Image_3D = None
|
19 |
Current_name = None
|
20 |
-
ALL_message = load_from_pkl(r'
|
21 |
|
22 |
-
Model_Paht = r'
|
23 |
checkpoint = torch.load(Model_Paht, map_location='cpu')
|
24 |
|
25 |
classnet = resnet50(
|
@@ -304,11 +304,19 @@ class App:
|
|
304 |
|
305 |
gr.Markdown('''# Examples''')
|
306 |
gr.Examples(
|
307 |
-
examples=[[os.path.join(os.path.dirname(__file__), "155086_A_R_MRI.nii.gz")
|
308 |
-
[os.path.join(os.path.dirname(__file__), "
|
309 |
-
inputs=
|
310 |
-
outputs=[
|
311 |
-
fn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
cache_examples=True,
|
313 |
)
|
314 |
demo.queue(concurrency_count=6)
|
|
|
17 |
|
18 |
Image_3D = None
|
19 |
Current_name = None
|
20 |
+
ALL_message = load_from_pkl(r'.\label0601.pkl')
|
21 |
|
22 |
+
Model_Paht = r'.\model_epoch62.pth.tar'
|
23 |
checkpoint = torch.load(Model_Paht, map_location='cpu')
|
24 |
|
25 |
classnet = resnet50(
|
|
|
304 |
|
305 |
gr.Markdown('''# Examples''')
|
306 |
gr.Examples(
|
307 |
+
examples=[[os.path.join(os.path.dirname(__file__), "155086_A_R_MRI.nii.gz")],
|
308 |
+
[os.path.join(os.path.dirname(__file__), "4153597_B_L_MRI.nii.gz")]],
|
309 |
+
inputs=inp,
|
310 |
+
outputs=[out1, out2, out3, slider1, slider2, slider3,out8],
|
311 |
+
fn=get_Image_reslice,
|
312 |
+
cache_examples=True,
|
313 |
+
)
|
314 |
+
gr.Examples(
|
315 |
+
examples=[[os.path.join(os.path.dirname(__file__), "155086_A_R_ROI.nii.gz")],
|
316 |
+
[os.path.join(os.path.dirname(__file__), "4153597_B_L_ROI.nii.gz")]],
|
317 |
+
inputs=inp2,
|
318 |
+
outputs=out9,
|
319 |
+
fn=get_ROI,
|
320 |
cache_examples=True,
|
321 |
)
|
322 |
demo.queue(concurrency_count=6)
|