wintergw commited on
Commit
c378e65
·
verified ·
1 Parent(s): 44eef32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
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
- # Now, app.py should be able to import optmodel successfully
 
 
 
 
 
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
+