Spaces:
Paused
Paused
Commit
·
fa7a80c
1
Parent(s):
9e7e267
Requierements
Browse files
app.py
CHANGED
@@ -3,11 +3,15 @@ import gradio as gr
|
|
3 |
import tensorflow as tf
|
4 |
import matplotlib.pyplot as plt
|
5 |
from ttictoc import tic,toc
|
|
|
6 |
|
7 |
# '''--------------------------- Preprocesamiento ----------------------------'''
|
8 |
# tic()
|
9 |
# 3D U-Net
|
10 |
-
|
|
|
|
|
|
|
11 |
|
12 |
with tf.device("cpu:0"):
|
13 |
model_unet = utils.import_3d_unet(path_3d_unet)
|
@@ -22,7 +26,7 @@ with tf.device("cpu:0"):
|
|
22 |
|
23 |
# '''---------------------------- Procesamiento ------------------------------'''
|
24 |
# # Med net
|
25 |
-
# weight_path = '
|
26 |
# device_ids = [0]
|
27 |
# mednet = utils.create_mednet(weight_path, device_ids)
|
28 |
|
|
|
3 |
import tensorflow as tf
|
4 |
import matplotlib.pyplot as plt
|
5 |
from ttictoc import tic,toc
|
6 |
+
from urllib.request import urlretrieve
|
7 |
|
8 |
# '''--------------------------- Preprocesamiento ----------------------------'''
|
9 |
# tic()
|
10 |
# 3D U-Net
|
11 |
+
urlretrieve("https://dl.dropboxusercontent.com/s/ay5q8caqzlad7h5/unet.h5?dl=0", "unet.h5")
|
12 |
+
urlretrieve("https://dl.dropboxusercontent.com/s/otxsgx3e31d5h9i/resnet_50_23dataset.pth?dl=0", "resnet_50_23dataset.pth")
|
13 |
+
|
14 |
+
path_3d_unet = 'unet.h5'
|
15 |
|
16 |
with tf.device("cpu:0"):
|
17 |
model_unet = utils.import_3d_unet(path_3d_unet)
|
|
|
26 |
|
27 |
# '''---------------------------- Procesamiento ------------------------------'''
|
28 |
# # Med net
|
29 |
+
# weight_path = 'resnet_50_23dataset.pth'
|
30 |
# device_ids = [0]
|
31 |
# mednet = utils.create_mednet(weight_path, device_ids)
|
32 |
|