Upload folder using huggingface_hub
Browse files- server/app.py +8 -4
server/app.py
CHANGED
|
@@ -1,16 +1,20 @@
|
|
| 1 |
"""
|
| 2 |
Server entry point for OpenEnv compatibility.
|
| 3 |
-
This file re-exports the FastAPI app from the main server module.
|
| 4 |
"""
|
| 5 |
|
| 6 |
import sys
|
| 7 |
import os
|
| 8 |
|
| 9 |
-
# Add parent directory to path so imports work
|
| 10 |
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
| 11 |
|
| 12 |
from src.sql_arena.server import app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
if __name__ == "__main__":
|
| 15 |
-
|
| 16 |
-
uvicorn.run(app, host="0.0.0.0", port=7860)
|
|
|
|
| 1 |
"""
|
| 2 |
Server entry point for OpenEnv compatibility.
|
|
|
|
| 3 |
"""
|
| 4 |
|
| 5 |
import sys
|
| 6 |
import os
|
| 7 |
|
|
|
|
| 8 |
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
| 9 |
|
| 10 |
from src.sql_arena.server import app
|
| 11 |
+
import uvicorn
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
def main():
|
| 15 |
+
"""Main entry point to run the server."""
|
| 16 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|
| 17 |
+
|
| 18 |
|
| 19 |
if __name__ == "__main__":
|
| 20 |
+
main()
|
|
|