Spaces:
Sleeping
Sleeping
Hamam
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
%%file app.py
|
2 |
import streamlit as st
|
3 |
import numpy as np
|
4 |
from PIL import Image
|
@@ -18,7 +17,7 @@ def load_model(model, model_path, device):
|
|
18 |
return model
|
19 |
|
20 |
# Load the model onto the specified device
|
21 |
-
u2net = load_model(model=u2net, model_path="
|
22 |
|
23 |
# Mean and std for normalization
|
24 |
mean = torch.tensor([0.485, 0.456, 0.406])
|
|
|
|
|
1 |
import streamlit as st
|
2 |
import numpy as np
|
3 |
from PIL import Image
|
|
|
17 |
return model
|
18 |
|
19 |
# Load the model onto the specified device
|
20 |
+
u2net = load_model(model=u2net, model_path="u2net.pth", device="cpu")
|
21 |
|
22 |
# Mean and std for normalization
|
23 |
mean = torch.tensor([0.485, 0.456, 0.406])
|