Skip to content
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

Gradio versions with issues #131

Open
dophuchoan opened this issue Apr 23, 2024 · 6 comments
Open

Gradio versions with issues #131

dophuchoan opened this issue Apr 23, 2024 · 6 comments

Comments

@dophuchoan
Copy link

dophuchoan commented Apr 23, 2024

Hello all!
I'm facing an issue with gradio. With the newest gradio version (4.27.0) - I got this issue:

TypeError: Row.init() got an unexpected keyword argument 'scale'

Then I followed all the guides from other members, and tried to downgrade the version to: 3.25, 3.48, and even 3.50.2 but they all gave back a lot of errors, like this:

(trackany) E:\___AI\Track_Anthing>python app.py --device cuda:0
Initializing BaseSegmenter to cuda:0
Hyperparameters read from the model weights: C^k=64, C^v=512, C^h=64
Single object mode: False
load pretrained SPyNet...
Loads checkpoint by http backend from path: https://download.openmmlab.com/mmediting/restorers/basicvsr/spynet_20210409-c6c1bd09.pth
E:\___AI\Track_Anthing\app.py:431: GradioUnusedKwargWarning: You have unused kwarg parameters in Row, please remove them: {'scale': 0.4}
  with gr.Row(scale=0.4):
E:\___AI\Track_Anthing\app.py:432: GradioUnusedKwargWarning: You have unused kwarg parameters in Video, please remove them: {'autosize': True}
  video_input = gr.Video(autosize=True)
E:\___AI\Track_Anthing\app.py:457: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  clear_button_click = gr.Button(value="Clear clicks", interactive=True, visible=False).style(height=160)
E:\___AI\Track_Anthing\app.py:459: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  template_frame = gr.Image(type="pil",interactive=True, elem_id="template_frame", visible=False).style(height=360)
E:\___AI\Track_Anthing\app.py:466: GradioUnusedKwargWarning: You have unused kwarg parameters in Video, please remove them: {'autosize': True}
  video_output = gr.Video(autosize=True, visible=False).style(height=360)
E:\___AI\Track_Anthing\app.py:466: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  video_output = gr.Video(autosize=True, visible=False).style(height=360)
C:\Users\dophu\.conda\envs\trackany\lib\site-packages\gradio\utils.py:812: UserWarning: Expected 4 arguments for function <function select_template at 0x000002430FCC5B40>, received 3.
  warnings.warn(
C:\Users\dophu\.conda\envs\trackany\lib\site-packages\gradio\utils.py:816: UserWarning: Expected at least 4 arguments for function <function select_template at 0x000002430FCC5B40>, received 3.
  warnings.warn(
Traceback (most recent call last):
  File "C:\Users\dophu\AppData\Roaming\Python\Python310\site-packages\ffmpy.py", line 95, in run
    self.process = subprocess.Popen(
  File "C:\Users\dophu\.conda\envs\trackany\lib\subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\dophu\.conda\envs\trackany\lib\subprocess.py", line 1456, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\___AI\Track_Anthing\app.py", line 590, in <module>
    gr.Examples(
  File "C:\Users\dophu\.conda\envs\trackany\lib\site-packages\gradio\helpers.py", line 58, in create_examples
    examples_obj = Examples(
  File "C:\Users\dophu\.conda\envs\trackany\lib\site-packages\gradio\helpers.py", line 209, in __init__
    self.processed_examples = [
  File "C:\Users\dophu\.conda\envs\trackany\lib\site-packages\gradio\helpers.py", line 210, in <listcomp>
    [
  File "C:\Users\dophu\.conda\envs\trackany\lib\site-packages\gradio\helpers.py", line 211, in <listcomp>
    component.postprocess(sample)
  File "C:\Users\dophu\.conda\envs\trackany\lib\site-packages\gradio\components\video.py", line 273, in postprocess
    processed_files = (self._format_video(y), None)
  File "C:\Users\dophu\.conda\envs\trackany\lib\site-packages\gradio\components\video.py", line 327, in _format_video
    and not processing_utils.video_is_playable(video)
  File "C:\Users\dophu\.conda\envs\trackany\lib\site-packages\gradio\processing_utils.py", line 514, in video_is_playable
    output = probe.run(stderr=subprocess.PIPE, stdout=subprocess.PIPE)
  File "C:\Users\dophu\AppData\Roaming\Python\Python310\site-packages\ffmpy.py", line 105, in run
    raise FFExecutableNotFoundError(
ffmpy.FFExecutableNotFoundError: Executable 'ffprobe' not found

Any help would be really appreciated!
Again! Thank you for all of your hard work! <3

@algint
Copy link

algint commented Apr 25, 2024

换成3.9版本的gradio,因为依赖里gradio没有指定版本,pip拉取的最新,当前是4.3,会有语法上的问题

@ahmadrajati
Copy link

You can also install the last version of gradio and edit the app.py file. You can remove the scale parameter in gr.Row(), autosize in gr.Video(), .style() from the end of the lines that raise error, and remove the enable_queue parameter in iface.launch.

@algint
Copy link

algint commented Aug 7, 2024 via email

@mteixeiraTecgraf
Copy link

I am facing the same issues.
Anyone can help us?

@algint
Copy link

algint commented Aug 28, 2024 via email

@mteixeiraTecgraf
Copy link

This version worked for me.
gradio==3.39.0 .

I have tried this based on #120

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

No branches or pull requests

4 participants