PKU-YuanGroup / Video-LLaVA

【EMNLP 2024🔥】Video-LLaVA: Learning United Visual Representation by Alignment Before Projection
https://arxiv.org/pdf/2311.10122.pdf
Apache License 2.0
3.02k stars 220 forks source link

Error with Gradio Client: Please Upgrade Gradio to 4.x and Redeploying HuggingFace Space #170

Open zhanwenchen opened 5 months ago

zhanwenchen commented 5 months ago

There is a bug:

According to a member of Gradio, this is likely a version issue with your HF space:

https://github.com/gradio-app/gradio/issues/7722

File ~/miniconda3/envs/pllava/lib/python3.12/site-packages/gradio_client/utils.py:676, in get_extension(encoding)
    [675](https://vscode-remote+ssh-002dremote-002bc1.vscode-resource.vscode-cdn.net/home/ubuntu/pllava/tasks/eval/demo/~/miniconda3/envs/pllava/lib/python3.12/site-packages/gradio_client/utils.py:675) def get_extension(encoding: str) -> str | None:
--> [676](https://vscode-remote+ssh-002dremote-002bc1.vscode-resource.vscode-cdn.net/home/ubuntu/pllava/tasks/eval/demo/~/miniconda3/envs/pllava/lib/python3.12/site-packages/gradio_client/utils.py:676)     encoding = encoding.replace("audio/wav", "audio/x-wav")
    [677](https://vscode-remote+ssh-002dremote-002bc1.vscode-resource.vscode-cdn.net/home/ubuntu/pllava/tasks/eval/demo/~/miniconda3/envs/pllava/lib/python3.12/site-packages/gradio_client/utils.py:677)     type = mimetypes.guess_type(encoding)[0]
    [678](https://vscode-remote+ssh-002dremote-002bc1.vscode-resource.vscode-cdn.net/home/ubuntu/pllava/tasks/eval/demo/~/miniconda3/envs/pllava/lib/python3.12/site-packages/gradio_client/utils.py:678)     if type == "audio/flac":  # flac is not supported by mimetypes

AttributeError: 'dict' object has no attribute 'replace'