File size: 842 Bytes
5d25e99
8812c23
 
 
 
3ab82f0
8812c23
5d25e99
 
3ab82f0
ce34868
8812c23
 
5d25e99
8812c23
 
 
3ab82f0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""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")

@server.get("/", response_class=HTMLResponse, include_in_schema=False)
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)])