Spaces:
Sleeping
Sleeping
agregar auth token
Browse files
utils.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
import numpy as np
|
| 2 |
import torch
|
| 3 |
-
from huggan.pytorch.lightweight_gan import LightweightGAN
|
| 4 |
|
| 5 |
## Cargamos el modelo desde el Hub de Hugging Face
|
| 6 |
def carga_modelo(model_name="ceyda/butterfly_cropped_uniq1K_512", model_version=None):
|
| 7 |
-
gan = LightweightGAN.from_pretrained(model_name, version=model_version
|
| 8 |
gan.eval()
|
| 9 |
return gan
|
| 10 |
|
|
|
|
| 1 |
import numpy as np
|
| 2 |
import torch
|
| 3 |
+
from huggan.pytorch.lightweight_gan.lightweight_gan import LightweightGAN
|
| 4 |
|
| 5 |
## Cargamos el modelo desde el Hub de Hugging Face
|
| 6 |
def carga_modelo(model_name="ceyda/butterfly_cropped_uniq1K_512", model_version=None):
|
| 7 |
+
gan = LightweightGAN.from_pretrained(model_name, version=model_version, use_auth_token=True
|
| 8 |
gan.eval()
|
| 9 |
return gan
|
| 10 |
|