text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

AttributeError: module 'gradio' has no attribute 'Box'

Open khurrameycon opened this issue 1 year ago • 2 comments

Describe the bug

After installing Yaml and other modules, now i am facing the issue pertaining to AttributeError: module 'gradio' has no attribute 'Box'

I tried fixing the code, changing it with TextBox, but nothing has happened

Is there an existing issue for this?

  • [X] I have searched the existing issues

Reproduction

When running the start_windows.bat file, this issue appears as shown in screenshot

Screenshot

1

Logs

15:12:09-143609 INFO     Starting Text generation web UI
15:12:09-148608 INFO     Loading the extension "gallery"
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ C:\Users\Administrator\Downloads\text-generation-webui-main\server.py:254 in <module>                                │
│                                                                                                                      │
│   253         # Launch the web UI                                                                                    │
│ ❱ 254         create_interface()                                                                                     │
│   255         while True:                                                                                            │
│                                                                                                                      │
│ C:\Users\Administrator\Downloads\text-generation-webui-main\server.py:133 in create_interface                        │
│                                                                                                                      │
│   132         ui_parameters.create_ui(shared.settings['preset'])  # Parameters tab                                   │
│ ❱ 133         ui_model_menu.create_ui()  # Model tab                                                                 │
│   134         training.create_ui()  # Training tab                                                                   │
│                                                                                                                      │
│ C:\Users\Administrator\Downloads\text-generation-webui-main\modules\ui_model_menu.py:77 in create_ui                 │
│                                                                                                                      │
│    76                 shared.gradio['loader'] = gr.Dropdown(label="Model loader", choices=load                       │
│ ❱  77                 with gr.Box():                                                                                 │
│    78                     with gr.Row():                                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: module 'gradio' has no attribute 'Box'

System Info

I9 extreme, windows 11 with 2x NVIDIA 3070 GPUs

khurrameycon avatar Jan 16 '24 10:01 khurrameycon

原因是 gradio version 4.0.0 they removed it 删掉了这个box https://www.gradio.app/changelog#4-0-0 1

再进入虚拟环境更新成这个指定版本就行 成功啦 pip install --upgrade gradio==3.50.2 2

xiaowuzicode avatar Jan 26 '24 06:01 xiaowuzicode

安卓手机可以部署这个工具吗?termux感觉好多报错 @xiaowuzicode

adaaaaaa avatar Jan 29 '24 08:01 adaaaaaa

pip show g radio Name: gradio Version: 4.19.2 Kept upgrading gradio so figured I would just fix it.

The following changes fixed this. replace all __js= to just js= change gr.Box() to gr.Group() line 160 of server.py should be shared.gradio['interface'].queue(default_concurrency_limit=64)

Tested a bit to see if anything acted wonky, seemed to be working so far.

brucepro avatar Mar 01 '24 07:03 brucepro

This issue has been closed due to inactivity for 2 months. If you believe it is still relevant, please leave a comment below. You can tag a developer in your comment.

github-actions[bot] avatar Apr 30 '24 23:04 github-actions[bot]