Spaces:
Build error
Build error
Commit
·
fbe03e2
1
Parent(s):
a10635a
Add weights option to BiRefNet trained in all different settings.
Browse files
app.py
CHANGED
|
@@ -50,8 +50,7 @@ usage_to_weights_file = {
|
|
| 50 |
'DIS-TR_TEs': 'BiRefNet-DIS5K-TR_TEs'
|
| 51 |
}
|
| 52 |
|
| 53 |
-
|
| 54 |
-
# images = [image_1, image_2]
|
| 55 |
@spaces.GPU
|
| 56 |
def predict(image, resolution, weights_file):
|
| 57 |
global weights_path
|
|
@@ -92,7 +91,7 @@ def predict(image, resolution, weights_file):
|
|
| 92 |
return image, image_preds[0]
|
| 93 |
|
| 94 |
|
| 95 |
-
examples = [[_] for _ in glob('
|
| 96 |
|
| 97 |
# Add the option of resolution in a text box.
|
| 98 |
for idx_example, example in enumerate(examples):
|
|
|
|
| 50 |
'DIS-TR_TEs': 'BiRefNet-DIS5K-TR_TEs'
|
| 51 |
}
|
| 52 |
|
| 53 |
+
|
|
|
|
| 54 |
@spaces.GPU
|
| 55 |
def predict(image, resolution, weights_file):
|
| 56 |
global weights_path
|
|
|
|
| 91 |
return image, image_preds[0]
|
| 92 |
|
| 93 |
|
| 94 |
+
examples = [[_] for _ in glob('examples/*')][:]
|
| 95 |
|
| 96 |
# Add the option of resolution in a text box.
|
| 97 |
for idx_example, example in enumerate(examples):
|
{materials/examples → examples}/Helicopter.jpg
RENAMED
|
File without changes
|
{materials/examples → examples}/Jewelry.jpg
RENAMED
|
File without changes
|
{materials/examples → examples}/Windmill.jpg
RENAMED
|
File without changes
|