Spaces:
Sleeping
Sleeping
Commit ·
4276dbd
1
Parent(s): c36db0e
fixing openenv.yaml
Browse files- my_env/server/app.py +3 -0
my_env/server/app.py
CHANGED
|
@@ -262,6 +262,9 @@ def main(host: str = "0.0.0.0", port: int = 7860):
|
|
| 262 |
import uvicorn
|
| 263 |
uvicorn.run(app, host=host, port=port)
|
| 264 |
|
|
|
|
|
|
|
|
|
|
| 265 |
|
| 266 |
if __name__ == "__main__":
|
| 267 |
import argparse
|
|
|
|
| 262 |
import uvicorn
|
| 263 |
uvicorn.run(app, host=host, port=port)
|
| 264 |
|
| 265 |
+
# Mount root directory so openenv.yaml is accessible
|
| 266 |
+
_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
| 267 |
+
app.mount("/static", StaticFiles(directory=_root), name="static")
|
| 268 |
|
| 269 |
if __name__ == "__main__":
|
| 270 |
import argparse
|