TypeError: __init__() got an unexpected keyword argument 'label' - when running the Gradio demo web UI (`app.py`)
CREED404 opened this issue · 3 comments
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
Issue Description
Problem
The Gradio demo web UI (
app.py
) passes an outdated or incorrect argument to the Gradio Button class (label
), causing aTypeError
when theButton
class does not accept thislabel
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
@CREED404 I have the same issue, can you please let me know if you found the solution for it? My system runs on GPU, but it appears that this code expects CPU, could that be the reason?
Issue Description
Problem
The Gradio demo web UI (
app.py
) passes an outdated or incorrect argument to the Gradio Button class (label
), causing aTypeError
when theButton
class does not accept thislabel
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@CREED404 I have the same issue, can you please let me know if you found the solution for it? My system runs on GPU, but it appears that this code expects CPU, could that be the reason?
i made a pull request at #123 you can give it a look
Issue Description
Problem
The Gradio demo web UI (
app.py
) passes an outdated or incorrect argument to the Gradio Button class (label
), causing aTypeError
when theButton
class does not accept thislabel
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@CREED404 I have the same issue, can you please let me know if you found the solution for it? My system runs on GPU, but it appears that this code expects CPU, could that be the reason?
i made a pull request at #123 you can give it a look
@CREED404 Thanks. I tried your fix but it didn't solve my problem. You only changed one line in app.py right?
The error that I get ends at "W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Detectron v2 is not installed". It does not give any errors about app.py. So the error that I get is:
2023-12-11 14:23:03.705041: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2023-12-11 14:23:03.726726: 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 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-12-11 14:23:04.007292: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Detectron v2 is not installed
It doesn't say anything about app.py or clear_image_button. Can you please let me know if you know how to solve this issue?