Update app.py
Browse files
app.py
CHANGED
|
@@ -30,14 +30,13 @@ functions_path = hf_hub_download(
|
|
| 30 |
repo_type=REPO_TYPE
|
| 31 |
)
|
| 32 |
|
| 33 |
-
# Load and execute `app.py`
|
| 34 |
-
spec_app = importlib.util.spec_from_file_location("app", app_path)
|
| 35 |
-
app_module = importlib.util.module_from_spec(spec_app)
|
| 36 |
-
spec_app.loader.exec_module(app_module)
|
| 37 |
-
|
| 38 |
# Load `optmodel.py` as a module
|
| 39 |
spec_func = importlib.util.spec_from_file_location("optmodel", functions_path)
|
| 40 |
optmodel_module = importlib.util.module_from_spec(spec_func)
|
| 41 |
spec_func.loader.exec_module(optmodel_module)
|
| 42 |
|
| 43 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
repo_type=REPO_TYPE
|
| 31 |
)
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
# Load `optmodel.py` as a module
|
| 34 |
spec_func = importlib.util.spec_from_file_location("optmodel", functions_path)
|
| 35 |
optmodel_module = importlib.util.module_from_spec(spec_func)
|
| 36 |
spec_func.loader.exec_module(optmodel_module)
|
| 37 |
|
| 38 |
+
# Load and execute `app.py`
|
| 39 |
+
spec_app = importlib.util.spec_from_file_location("app", app_path)
|
| 40 |
+
app_module = importlib.util.module_from_spec(spec_app)
|
| 41 |
+
spec_app.loader.exec_module(app_module)
|
| 42 |
+
|