Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CREED404
Copy link

@CREED404 CREED404 commented Nov 19, 2023

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

  • Adjusted the Gradio Button instantiation in app.py to resolve the issue.

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

  • I have tested the changes locally.
  • My code follows the coding conventions of the Inpaint-Anything project.

@SiliconValey
Copy link

Hello,
I have the same error, I have de variable name 'source' is not correcto, the correct name is 'sources'. A crazy thing !!

@chnccy
Copy link

chnccy commented Aug 21, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants