ThomasLe/code-grader-agent
0
1#!/usr/bin/env python32"""3Main application entry point for Hugging Face Spaces4This file imports and runs the actual FastAPI app from the BE directory5"""6 7import sys8import os9 10# Add the BE directory to Python path11be_path = os.path.join(os.path.dirname(__file__), 'BE')12sys.path.insert(0, be_path)13 14# Change to BE directory for relative imports to work15os.chdir(be_path)16 17# Import the FastAPI app from BE directory18import app as be_app19app = be_app.app20 21if __name__ == "__main__":22 import uvicorn23 port = int(os.environ.get("PORT", 7860))24 print(f"🤖 Starting Code-Grader-Agent on port {port}...")25 uvicorn.run(app, host="0.0.0.0", port=port)26 