Spaces:
Runtime error
Runtime error
Commit
·
9509acd
1
Parent(s):
ba00f16
Update utils.py
Browse files
utils.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
import numpy as np
|
2 |
import torch
|
3 |
-
|
4 |
-
from lightweight_gan import LightweightGAN
|
5 |
|
6 |
## Cargamos el modelo desde el Hub de Hugging Face
|
7 |
def carga_modelo(model_name="ceyda/butterfly_cropped_uniq1K_512", model_version=None):
|
8 |
-
gan = LightweightGAN.from_pretrained(model_name, version=model_version)
|
9 |
gan.eval()
|
10 |
return gan
|
11 |
|
|
|
1 |
import numpy as np
|
2 |
import torch
|
3 |
+
from huggan.pytorch.lightweight_gan.lightweight_gan import LightweightGAN
|
4 |
+
##from lightweight_gan import LightweightGAN
|
5 |
|
6 |
## Cargamos el modelo desde el Hub de Hugging Face
|
7 |
def carga_modelo(model_name="ceyda/butterfly_cropped_uniq1K_512", model_version=None):
|
8 |
+
gan = LightweightGAN.from_pretrained(model_name, version=model_version, use_auth_token)
|
9 |
gan.eval()
|
10 |
return gan
|
11 |
|