Spaces:
Running
A newer version of the Gradio SDK is available: 6.14.0
title: iWorld-Bench Leaderboard
emoji: 🌍
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 4.44.1
python_version: '3.12'
app_file: app.py
pinned: false
iWorld-Bench Leaderboard
A comprehensive benchmark for interactive world models.
Local run
pip install -r requirements.txt
python app.py
If you deploy in Docker and Gradio reports that localhost is not accessible, set environment variable GRADIO_SHARE=true. On Hugging Face Spaces the default (share off) is correct.
Deploy to Hugging Face Space(与本地 readme更新.txt 一致)
网页新建 Space:Licence MIT、SDK Gradio、硬件 CPU basic、Public。复制 Git 地址 https://huggingface.co/spaces/<用户名>/<Space名>。
在 WSL 或 Git Bash 中(路径请改成你的仓库位置):
# 0. 进入项目根目录(含 app.py)
cd /mnt/d/lab/Thu_lab/iworld-bench
# 1. CLI(若 requirements 里已包含可跳过)
pip install -U "huggingface_hub[cli]"
# 2. 登录(Token:https://huggingface.co/settings/tokens )
huggingface-cli login
# 3. 确认登录
huggingface-cli whoami
# 4. 若尚未初始化 git(可选)
# git init
# 5. 添加远程(把 <用户名>/<Space名> 换成你的)
git remote add origin https://huggingface.co/spaces/<用户名>/<Space名>
# 若已存在 origin,用:git remote set-url origin https://huggingface.co/spaces/<用户名>/<Space名>
# 6. 拉取 Space 自动生成的小提交(若失败可跳过)
git pull origin main --allow-unrelated-histories
# 若没有 main:git branch -M main
# 7. 只添加需要上云的文件(不要 add bench/、不要 add zip)
git add README.md app.py requirements.txt data/results.csv
find src -name '*.py' -not -path 'src/bench/*' -exec git add {} +
# 8. 提交并推送
git commit -m "Deploy iWorld-Bench leaderboard"
git push -u origin main
推送后在 Space 页面 ⋯ → Restart Space。若构建失败,在 Space Settings → Repository secrets 可设变量 GRADIO_SHARE(一般留空即可;仅当你自建 Docker 且报 localhost 相关错误时再设为 true)。
Windows 若只用 PowerShell 且没有 find,可改用:
git add README.md app.py requirements.txt data/results.csv
Get-ChildItem -Path src -Filter *.py -Recurse | Where-Object { $_.FullName -notmatch '\\bench\\' } | ForEach-Object { git add $_.FullName }
Dependency note
Keep starlette<1.0 (see requirements.txt). Starlette 1.0 changed TemplateResponse; Gradio 4.44.x is built for the older API. Installing Starlette 1.x can cause TypeError: unhashable type: 'dict' when loading the Gradio UI.