Spaces:
Runtime error
Runtime error
SerdarHelli
commited on
Commit
•
9a66c24
1
Parent(s):
4b085f9
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,11 @@ import gradio as gr
|
|
8 |
from huggingface_hub import hf_hub_download
|
9 |
import sys
|
10 |
import os
|
|
|
11 |
|
12 |
|
|
|
|
|
13 |
def layout_grid(img, grid_w=None, grid_h=1, float_to_uint8=True, chw_to_hwc=True, to_numpy=True):
|
14 |
batch_size, channels, img_h, img_w = img.shape
|
15 |
if grid_w is None:
|
@@ -30,7 +33,7 @@ def layout_grid(img, grid_w=None, grid_h=1, float_to_uint8=True, chw_to_hwc=True
|
|
30 |
sys.path.insert(0, 'Brain-MR-Image-Generation-GAN ')
|
31 |
|
32 |
|
33 |
-
network_pkl=
|
34 |
with open(network_pkl, 'rb') as f:
|
35 |
G = pickle.load(f)['G_ema']
|
36 |
|
|
|
8 |
from huggingface_hub import hf_hub_download
|
9 |
import sys
|
10 |
import os
|
11 |
+
import subprocess
|
12 |
|
13 |
|
14 |
+
subprocess.Popen('git clone https://huggingface.co/SerdarHelli/BrainMRIGAN')
|
15 |
+
|
16 |
def layout_grid(img, grid_w=None, grid_h=1, float_to_uint8=True, chw_to_hwc=True, to_numpy=True):
|
17 |
batch_size, channels, img_h, img_w = img.shape
|
18 |
if grid_w is None:
|
|
|
33 |
sys.path.insert(0, 'Brain-MR-Image-Generation-GAN ')
|
34 |
|
35 |
|
36 |
+
network_pkl='braingan-400.pkl'
|
37 |
with open(network_pkl, 'rb') as f:
|
38 |
G = pickle.load(f)['G_ema']
|
39 |
|