Commit
·
e9ceefd
1
Parent(s):
b192d9e
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,27 +1,21 @@
|
|
| 1 |
-
#!/usr/bin/env python
|
| 2 |
|
| 3 |
-
from __future__ import annotations
|
| 4 |
-
|
| 5 |
-
import argparse
|
| 6 |
-
import functools
|
| 7 |
import os
|
| 8 |
import pickle
|
| 9 |
import sys
|
| 10 |
import subprocess
|
| 11 |
-
proc = subprocess.Popen(['git', 'clone', 'https://github.com/NVlabs/stylegan3.git' ,"stylegan3"],
|
| 12 |
-
stdout=subprocess.PIPE,
|
| 13 |
-
stderr=subprocess.STDOUT)
|
| 14 |
-
sys.path.insert(0, 'stylegan3')
|
| 15 |
-
|
| 16 |
import imageio
|
| 17 |
import numpy as np
|
| 18 |
import scipy.interpolate
|
| 19 |
import torch
|
| 20 |
from tqdm import tqdm
|
| 21 |
import gradio as gr
|
| 22 |
-
from huggingface_hub import hf_hub_download
|
| 23 |
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
def layout_grid(img, grid_w=None, grid_h=1, float_to_uint8=True, chw_to_hwc=True, to_numpy=True):
|
| 26 |
batch_size, channels, img_h, img_w = img.shape
|
| 27 |
if grid_w is None:
|
|
|
|
|
|
|
| 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import os
|
| 3 |
import pickle
|
| 4 |
import sys
|
| 5 |
import subprocess
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
import imageio
|
| 7 |
import numpy as np
|
| 8 |
import scipy.interpolate
|
| 9 |
import torch
|
| 10 |
from tqdm import tqdm
|
| 11 |
import gradio as gr
|
|
|
|
| 12 |
|
| 13 |
|
| 14 |
+
proc = subprocess.Popen(['git', "clone", 'https://github.com/NVlabs/stylegan3.git' ,"stylegan3"],
|
| 15 |
+
stdout=subprocess.PIPE,
|
| 16 |
+
stderr=subprocess.STDOUT)
|
| 17 |
+
sys.path.insert(0, 'stylegan3')
|
| 18 |
+
|
| 19 |
def layout_grid(img, grid_w=None, grid_h=1, float_to_uint8=True, chw_to_hwc=True, to_numpy=True):
|
| 20 |
batch_size, channels, img_h, img_w = img.shape
|
| 21 |
if grid_w is None:
|