Skip to content

TypeError: __init__() got an unexpected keyword argument 'label' - when running the Gradio demo web UI (app.py) #122

@CREED404

Description

@CREED404

Issue Description

Problem

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.

Context

The 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 needs adjustment.

Additional Information

  • Gradio Version: [Gradio 4.4.1]
  • Environment: [Google Colaboratory.]
  • Python Version: [Python 3.8.18]

Screenshots

The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling transformers.utils.move_cache().
0it [00:00, ?it/s]
2023-11-19 15:54:28.784275: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-11-19 15:54:30.186323: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Detectron v2 is not installed
Traceback (most recent call last):
File "app.py", line 288, in
clear_button_image = gr.Button(value="Reset", label="Reset", variant="secondary")
File "/usr/local/envs/lama/lib/python3.8/site-packages/gradio/component_meta.py", line 152, in wrapper
return fn(self, **kwargs)
TypeError: init() got an unexpected keyword argument 'label'

Related Pull Request

I made a pull request #123 to fix this issue

i want someone to confirm that he is having the same issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions