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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chatbot avatar image not loading in chatbot_multimodal demo #6329

Closed
1 task done
freddyaboulton opened this issue Nov 7, 2023 · 5 comments 路 Fixed by #6379
Closed
1 task done

Chatbot avatar image not loading in chatbot_multimodal demo #6329

freddyaboulton opened this issue Nov 7, 2023 · 5 comments 路 Fixed by #6379
Assignees
Labels
bug Something isn't working

Comments

@freddyaboulton
Copy link
Collaborator

Describe the bug

The chatbot avatar image is not loading

Have you searched existing issues? 馃攷

  • I have searched and found no existing issues

Reproduction

send a message to the bot in the chatbot_multimodal demo and observe the avatar image.

Screenshot

image

Logs

No response

System Info

Gradio Environment Information:
------------------------------
Operating System: Darwin
gradio version: 4.1.1
gradio_client version: 0.7.0

------------------------------------------------
gradio dependencies in your environment:

aiofiles: 23.1.0
altair: 5.0.1
fastapi: 0.100.0
ffmpy: 0.3.0
gradio-client==0.7.0 is not installed.
httpx: 0.24.1
huggingface-hub: 0.16.4
importlib-resources: 6.1.1
jinja2: 3.1.2
markupsafe: 2.1.3
matplotlib: 3.7.2
numpy: 1.25.1
orjson: 3.9.2
packaging: 23.1
pandas: 2.0.3
pillow: 10.0.0
pydantic: 2.4.2
pydub: 0.25.1
python-multipart: 0.0.6
pyyaml: 6.0
requests: 2.31.0
semantic-version: 2.10.0
tomlkit==0.12.0 is not installed.
typer: 0.9.0
typing-extensions: 4.7.1
uvicorn: 0.22.0
websockets: 11.0.3
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.


gradio_client dependencies in your environment:

fsspec: 2023.6.0
httpx: 0.24.1
huggingface-hub: 0.16.4
packaging: 23.1
requests: 2.31.0
typing-extensions: 4.7.1
websockets: 11.0.3

Severity

I can work around it

@freddyaboulton freddyaboulton added the bug Something isn't working label Nov 7, 2023
@abidlabs
Copy link
Member

abidlabs commented Nov 7, 2023

Ah this is because of the new file policy. We'll need to move the avatar images to the cache as well

@freddyaboulton
Copy link
Collaborator Author

But the demo is setting allowed_paths?

@abidlabs
Copy link
Member

abidlabs commented Nov 7, 2023

Because allowed_paths is relative to the working directory, you have to run the demo from the demo/chatbot_multimodal/ folder for it to work:

image

And in the deployed Spaces, it doesn't work because there is a single launch() command for the entire collection of demos, which does not set allowed_paths

@abidlabs
Copy link
Member

abidlabs commented Nov 7, 2023

Anyways, a user shouldn't have to do this, the better thing would be to use move_resource_to_block_cache to move the avatar images

@freddyaboulton
Copy link
Collaborator Author

Gotcha. Problem was happening for me locally but I was also not running the demo from the same directory as the image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants