Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -283,17 +283,6 @@ def transform(tensor):
|
|
| 283 |
T.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
|
| 284 |
])(to_pil(tensor))
|
| 285 |
|
| 286 |
-
def transform(tensor):
|
| 287 |
-
"""
|
| 288 |
-
Define the necessary transformations for the image.
|
| 289 |
-
"""
|
| 290 |
-
to_pil = T.ToPILImage()
|
| 291 |
-
return T.Compose([
|
| 292 |
-
T.Resize((256, 256)), # Example resize, adjust as needed
|
| 293 |
-
T.ToTensor(),
|
| 294 |
-
T.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
|
| 295 |
-
])(to_pil(tensor))
|
| 296 |
-
|
| 297 |
def infer_compo(style_description, ref_style_file, caption, ref_sub_file):
|
| 298 |
global models_rbm, models_b
|
| 299 |
try:
|
|
|
|
| 283 |
T.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
|
| 284 |
])(to_pil(tensor))
|
| 285 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 286 |
def infer_compo(style_description, ref_style_file, caption, ref_sub_file):
|
| 287 |
global models_rbm, models_b
|
| 288 |
try:
|