Spaces:
Running
Running
Download app.py from yushaohan/IntReal-Leaderboard: direct link, hf CLI and curl.
- Browser
- Download file 842 Bytes
-
https://huggingface.co/spaces/yushaohan/IntReal-Leaderboard/resolve/main/app.py
- Command line
-
hf download hf://spaces/yushaohan/IntReal-Leaderboard/app.py
-
curl -L -o app.py https://huggingface.co/spaces/yushaohan/IntReal-Leaderboard/resolve/main/app.py
842 Bytes
| """Serve the curated IntReal leaderboard on Hugging Face Spaces.""" | |
| from pathlib import Path | |
| import gradio as gr | |
| from fastapi.responses import HTMLResponse | |
| from fastapi.staticfiles import StaticFiles | |
| from submission_backend import install_submissions | |
| STATIC_DIR = Path(__file__).parent / "static" | |
| server = gr.Server(title="IntReal Leaderboard", description="A real-world benchmark for multimodal interleaved generation.") | |
| submission_service = install_submissions(server) | |
| server.mount("/leaderboard-assets", StaticFiles(directory=STATIC_DIR), name="leaderboard-assets") | |
| async def homepage(): | |
| return HTMLResponse((STATIC_DIR / "index.html").read_text()) | |
| if __name__ == "__main__": | |
| server.launch(max_file_size="1kb", blocked_paths=[str(submission_service.root)]) | |