Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -84,7 +84,7 @@ usage_to_weights_file = {
|
|
84 |
'General-legacy': 'BiRefNet-legacy'
|
85 |
}
|
86 |
|
87 |
-
birefnet = AutoModelForImageSegmentation.from_pretrained('/
|
88 |
birefnet.to(device)
|
89 |
birefnet.eval()
|
90 |
|
@@ -95,7 +95,7 @@ def predict(images):
|
|
95 |
|
96 |
global birefnet
|
97 |
# Load BiRefNet with chosen weights
|
98 |
-
_weights_file = '/
|
99 |
print('Using weights: {}.'.format(_weights_file))
|
100 |
birefnet = AutoModelForImageSegmentation.from_pretrained(_weights_file, trust_remote_code=True)
|
101 |
birefnet.to(device)
|
|
|
84 |
'General-legacy': 'BiRefNet-legacy'
|
85 |
}
|
86 |
|
87 |
+
birefnet = AutoModelForImageSegmentation.from_pretrained('zhengpeng7/BiRefNet_lite'), trust_remote_code=True)
|
88 |
birefnet.to(device)
|
89 |
birefnet.eval()
|
90 |
|
|
|
95 |
|
96 |
global birefnet
|
97 |
# Load BiRefNet with chosen weights
|
98 |
+
_weights_file = 'zhengpeng7/BiRefNet_lite'
|
99 |
print('Using weights: {}.'.format(_weights_file))
|
100 |
birefnet = AutoModelForImageSegmentation.from_pretrained(_weights_file, trust_remote_code=True)
|
101 |
birefnet.to(device)
|