Spaces:
Running on A10G
Running on A10G
udbhav commited on
Commit ·
13b2151
1
Parent(s): ca34b49
fix: ensure private app is registered in sys.modules after loading
Browse files
app.py
CHANGED
|
@@ -120,6 +120,7 @@ def _load_private_app_once():
|
|
| 120 |
raise ImportError(f"Could not load spec from {app_file_path}")
|
| 121 |
|
| 122 |
private_app = importlib.util.module_from_spec(spec)
|
|
|
|
| 123 |
spec.loader.exec_module(private_app)
|
| 124 |
# If the private app exposes a thumbnail generator, run it once
|
| 125 |
# so example images are ready even when we bypass its main().
|
|
|
|
| 120 |
raise ImportError(f"Could not load spec from {app_file_path}")
|
| 121 |
|
| 122 |
private_app = importlib.util.module_from_spec(spec)
|
| 123 |
+
sys.modules[spec.name] = private_app
|
| 124 |
spec.loader.exec_module(private_app)
|
| 125 |
# If the private app exposes a thumbnail generator, run it once
|
| 126 |
# so example images are ready even when we bypass its main().
|