AndrewRqy commited on
Commit ·
5a07d58
1
Parent(s): c38b046
Pin Gradio 5.29.1 (last known-good HF Space version) + fastapi 0.112.2
Browse filesFiles changed (3)
- README.md+1-1
- app.py+2-10
- requirements.txt+11-7
3 unmodified lines456789103 unmodified linescolorFrom: indigocolorTo: yellowsdk: gradiosdk_version: 6.18.0python_version: "3.10"suggested_hardware: cpu-basicapp_file: app.py3 unmodified lines456789103 unmodified linescolorFrom: indigocolorTo: yellowsdk: gradiosdk_version: 5.29.1python_version: "3.10"suggested_hardware: cpu-basicapp_file: app.py
4407 unmodified lines44084409441044114412441344144415441644174418421 unmodified lines4840484148424843484448454846484748484849485048514407 unmodified linesinput_background_fill="#251d2e",)# Gradio 6 moved theme + css from Blocks() to launch(). They're set as# attributes on the Blocks instance after construction so HF Space's# own launcher (which calls .launch() with defaults, ignoring any args# we pass to our own launch()) still picks them up.with gr.Blocks(title="The Apprentice",analytics_enabled=False,) as demo:421 unmodified linesshow_progress="hidden",)# Gradio 6: theme + css are launch() params, not Blocks() params. But# HF Space's launcher calls .launch() itself with defaults — so we# attach them as attributes on the Blocks instance. Gradio reads# demo.theme and demo.css at launch time regardless of who calls launch.demo.theme = _apprentice_themedemo.css = composed_cssreturn demo4407 unmodified lines440844094410441144124413441444154416421 unmodified lines4838483948404841484248434407 unmodified linesinput_background_fill="#251d2e",)with gr.Blocks(theme=_apprentice_theme,css=composed_css,title="The Apprentice",analytics_enabled=False,) as demo:421 unmodified linesshow_progress="hidden",)return demo
12345678910# Gradio 6.x — the current stable line as of 2026-06. Bumping from the# 4.x / 5.x lines avoids three known-bad interactions with the rest of HF's# Space environment in 2026 (HfFolder removal, Starlette TemplateResponse# signature change, Jinja2 LRUCache key strictness). Gradio 6 pins compatible# versions of huggingface_hub / starlette / jinja2 / fastapi internally so# we don't need to over-constrain them.gradio>=6.0,<7# OpenAI client — used as the SDK for the Modal-hosted vLLM endpointopenai>=1.401234567891011121314# Gradio 5.29.1 — last known-good HF Space version per forum reports.# We tried 4.44.1 (HfFolder), 5.0.1 (Jinja2 cache bug), 6.18.0 (renders blank# with no error). 5.29.1 has none of those issues and is broadly used on# Spaces in 2026.# discuss.huggingface.co/t/gradio-sdk-5-31-0-fully-dysfunctional-api-on-huggingface# huggingface_hub<0.34 — gradio 5.29 oauth.py still imports HfFolder.# Pin fastapi to 0.112.2 — multiple forum reports of blank-page issues fixed# by this exact pin on HF Spaces in 2026.gradio==5.29.1huggingface_hub>=0.23,<0.34fastapi==0.112.2# OpenAI client — used as the SDK for the Modal-hosted vLLM endpointopenai>=1.40
README.md+1-1
app.py+2-10
requirements.txt+11-7