geekyutao / Inpaint-Anything

Inpaint anything using Segment Anything and inpainting models.
Apache License 2.0
6.4k stars 525 forks source link

Fix Gradio Button __init__ got an unexpected keyword argument 'label' in Gradio demo web UI #121

Closed CREED404 closed 10 months ago

CREED404 commented 10 months ago

Description

The Gradio demo web UI (app.py) passes an outdated or incorrect argument to the Gradio Button class (label ), causing a TypeError when the Button class does not accept this label attribute, leading to a failure of the web UI.

This pull request addresses an issue in the Gradio demo web UI (app.py), where an outdated or incorrect argument (label) get passed to the Gradio Button class, which causes a TypeError when the Button class did not accept it, leading to a failure in the web UI. This pull request updates the code to use the label argument based on its availability as a Button attribute.

Changes Made

Context

The original code might have been written for an older version of Gradio, where label was a valid argument. However, the current version does not support this argument, and the code needed adjustment.

Checklist