Spaces:
Runtime error
Startup fails at gr.Button(label=...): the app targets gradio 3.35.2, but the Space builds with gradio 4.37.2
This Space dies while building its UI:
File ".../gradio/component_meta.py", line 163, in wrapper
TypeError: Button.__init__() got an unexpected keyword argument 'label'
at app.py's gr.Button(label="Run EditAnying", interactive=True) (line 55).
The two version declarations in the repo disagree. requirements.txt pins gradio==3.35.2, whose Button accepts label. But the README frontmatter sets sdk_version: 4.37.2, and that is the gradio the platform builds the Space with โ in gradio 4.x, Button no longer takes label; the button's text is its value.
Two ways to close it:
- Change the call sites to the 4.x form โ
gr.Button(value="Run EditAnying", interactive=True)โ and audit the rest ofapp.pyfor other 3.x-only arguments, since this is unlikely to be the only one. - Or set
sdk_versionin the README to the 3.35.2 the code was written against, if staying on the old gradio is intended.
I verified the mechanism on the exact version in the README: on gradio 4.37.2, gr.Button(label="Run EditAnying", interactive=True) raises the identical TypeError from the traceback, and gr.Button(value="Run EditAnying", interactive=True) constructs fine. The requirements.txt pin can't rescue this on its own โ the SDK version in the README is what the build installs.