Reachy-Mini_Best_Spaces / generate-dashboard-list.py
PierreRouanet's picture
Add dashboard-curated-list.
a30f5d4
raw
history blame
915 Bytes
import asyncio
from pydantic import BaseModel
from reachy_mini.apps import AppInfo
from reachy_mini.apps.sources.hf_space import app_info_from_space_url
class DashboardAppList(BaseModel):
dashboard_selected_apps: list[AppInfo]
if __name__ == "__main__":
async def main():
apps = list(
await asyncio.gather(
app_info_from_space_url(
"https://huggingface.co/spaces/pollen-robotics/red_light_green_light"
),
app_info_from_space_url(
"https://huggingface.co/spaces/pollen-robotics/dance_dance_mini"
),
)
)
dashboard_list = DashboardAppList(dashboard_selected_apps=apps)
with open("dashboard-app-list.json", "w") as f:
f.write(dashboard_list.model_dump_json())
print("Dashboard app list generated.")
asyncio.run(main())