Spaces:
Running
Running
restore
Browse files
app.py
CHANGED
@@ -24,8 +24,6 @@ from streamlit_cropper import st_cropper
|
|
24 |
from streamlit_drawable_canvas import st_canvas
|
25 |
from streamlit_image_select import image_select
|
26 |
|
27 |
-
from huggingface_hub import PyTorchModelHubMixin
|
28 |
-
|
29 |
|
30 |
def get_memory_usage():
|
31 |
process = psutil.Process()
|
@@ -180,12 +178,6 @@ def load_models():
|
|
180 |
model_arrow.load_state_dict(torch.load(output_arrow, map_location=device))
|
181 |
model_object.load_state_dict(torch.load(output_object, map_location=device))
|
182 |
|
183 |
-
# save locally
|
184 |
-
model_arrow.save_pretrained("model_arrow")
|
185 |
-
|
186 |
-
# push to the hub
|
187 |
-
model_arrow.push_to_hub("model_arrow")
|
188 |
-
|
189 |
st.session_state.model_loaded = True
|
190 |
st.session_state.model_arrow = model_arrow
|
191 |
st.session_state.model_object = model_object
|
|
|
24 |
from streamlit_drawable_canvas import st_canvas
|
25 |
from streamlit_image_select import image_select
|
26 |
|
|
|
|
|
27 |
|
28 |
def get_memory_usage():
|
29 |
process = psutil.Process()
|
|
|
178 |
model_arrow.load_state_dict(torch.load(output_arrow, map_location=device))
|
179 |
model_object.load_state_dict(torch.load(output_object, map_location=device))
|
180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
st.session_state.model_loaded = True
|
182 |
st.session_state.model_arrow = model_arrow
|
183 |
st.session_state.model_object = model_object
|