Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
4edabb2
1
Parent(s):
681c14f
Upgrade the weights loading method to avoid duplicated loading.
Browse files
app.py
CHANGED
|
@@ -54,6 +54,7 @@ weights_path = weights_path
|
|
| 54 |
|
| 55 |
@spaces.GPU
|
| 56 |
def predict(image, resolution, weights_file):
|
|
|
|
| 57 |
global weights_path
|
| 58 |
if weights_path != weights_file:
|
| 59 |
print('*' * 10)
|
|
|
|
| 54 |
|
| 55 |
@spaces.GPU
|
| 56 |
def predict(image, resolution, weights_file):
|
| 57 |
+
global birefnet
|
| 58 |
global weights_path
|
| 59 |
if weights_path != weights_file:
|
| 60 |
print('*' * 10)
|