Spaces:
Paused
Paused
Commit
·
3668992
1
Parent(s):
629926d
Add references
Browse files
app.py
CHANGED
|
@@ -6,9 +6,17 @@ from IPython import display
|
|
| 6 |
import torch
|
| 7 |
from torchvision import utils as tv_utils
|
| 8 |
from torchvision.transforms import functional as TF
|
| 9 |
-
from tqdm.notebook import trange, tqdm
|
| 10 |
import gradio as gr
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
from huggingface_hub import hf_hub_download
|
| 13 |
|
| 14 |
from CLIP import clip
|
|
|
|
| 6 |
import torch
|
| 7 |
from torchvision import utils as tv_utils
|
| 8 |
from torchvision.transforms import functional as TF
|
|
|
|
| 9 |
import gradio as gr
|
| 10 |
+
from git.repo.base import Repo
|
| 11 |
+
from os.path import exists as path_exists
|
| 12 |
+
|
| 13 |
+
if not (path_exists(f"v-diffusion-pytorch")):
|
| 14 |
+
Repo.clone_from("https://github.com/crowsonkb/v-diffusion-pytorch", "v-diffusion-pytorch")
|
| 15 |
+
if not (path_exists(f"CLIP")):
|
| 16 |
+
Repo.clone_from("https://github.com/openai/CLIP", "CLIP")
|
| 17 |
+
sys.path.append('v-diffusion-pytorch')
|
| 18 |
+
|
| 19 |
+
|
| 20 |
from huggingface_hub import hf_hub_download
|
| 21 |
|
| 22 |
from CLIP import clip
|