Spaces:
Build error
Build error
Upload gradio_app.py with huggingface_hub
Browse files- gradio_app.py +7 -6
gradio_app.py
CHANGED
@@ -61,6 +61,13 @@ def load_models(
|
|
61 |
model_2: RELATIVE_PREDICTORS,
|
62 |
progress=gr.Progress(),
|
63 |
) -> str:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
global MODEL_1, MODEL_2
|
65 |
# delete the previous models and clear gpu memory
|
66 |
if "MODEL_1" in globals():
|
@@ -72,12 +79,6 @@ def load_models(
|
|
72 |
|
73 |
progress(0, desc="Loading Models please wait...")
|
74 |
|
75 |
-
models: list[int] = [model_1, model_2]
|
76 |
-
# check if the models are in the list of models to skip
|
77 |
-
if any(model in MODELS_TO_SKIP for model in models):
|
78 |
-
raise gr.Error(
|
79 |
-
f"Model not supported on ZeroGPU, please try another model: {MODELS_TO_SKIP}"
|
80 |
-
)
|
81 |
loaded_models = []
|
82 |
|
83 |
for model in models:
|
|
|
61 |
model_2: RELATIVE_PREDICTORS,
|
62 |
progress=gr.Progress(),
|
63 |
) -> str:
|
64 |
+
models: list[int] = [model_1, model_2]
|
65 |
+
# check if the models are in the list of models to skip
|
66 |
+
if any(model in MODELS_TO_SKIP for model in models):
|
67 |
+
raise gr.Error(
|
68 |
+
f"Model not supported on ZeroGPU, please try another model: {MODELS_TO_SKIP}"
|
69 |
+
)
|
70 |
+
|
71 |
global MODEL_1, MODEL_2
|
72 |
# delete the previous models and clear gpu memory
|
73 |
if "MODEL_1" in globals():
|
|
|
79 |
|
80 |
progress(0, desc="Loading Models please wait...")
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
loaded_models = []
|
83 |
|
84 |
for model in models:
|