Spaces:
Sleeping
Sleeping
Deploy: sync from local
Browse files- README.md +1 -1
- meridian.py +18 -0
README.md
CHANGED
|
@@ -5,7 +5,7 @@ colorFrom: blue
|
|
| 5 |
colorTo: indigo
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.13.0
|
| 8 |
-
app_file:
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
|
|
|
| 5 |
colorTo: indigo
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.13.0
|
| 8 |
+
app_file: meridian.py
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
meridian.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""HuggingFace Spaces entry point.
|
| 2 |
+
|
| 3 |
+
HF Spaces executes the configured app file directly with `python <file>`,
|
| 4 |
+
which breaks relative imports inside the `app` package (no parent package).
|
| 5 |
+
This shim imports the Gradio Blocks instance from `app.ui` — that load goes
|
| 6 |
+
through the package, so the in-package relative imports resolve correctly —
|
| 7 |
+
and re-exposes it for Gradio's autodiscovery.
|
| 8 |
+
|
| 9 |
+
Local dev still uses `make ui` / `python -m app.ui` directly.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
from app.ui import demo
|
| 13 |
+
|
| 14 |
+
__all__ = ["demo"]
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
if __name__ == "__main__":
|
| 18 |
+
demo.queue().launch()
|