Spaces:
Runtime error
Runtime error
Change the way to apply patch
Browse files
app.py
CHANGED
@@ -15,7 +15,8 @@ import torch.nn as nn
|
|
15 |
from huggingface_hub import hf_hub_download
|
16 |
|
17 |
if os.environ.get('SYSTEM') == 'spaces':
|
18 |
-
|
|
|
19 |
|
20 |
sys.path.insert(0, 'stylegan2-pytorch')
|
21 |
|
|
|
15 |
from huggingface_hub import hf_hub_download
|
16 |
|
17 |
if os.environ.get('SYSTEM') == 'spaces':
|
18 |
+
with open('patch') as f:
|
19 |
+
subprocess.run('patch -p1'.split(), cwd='stylegan2-pytorch', stdin=f)
|
20 |
|
21 |
sys.path.insert(0, 'stylegan2-pytorch')
|
22 |
|