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

Chatbot does not show PDF file #4667

Closed
1 task done
Tracked by #4800
taoari opened this issue Jun 25, 2023 · 2 comments · Fixed by #4848
Closed
1 task done
Tracked by #4800

Chatbot does not show PDF file #4667

taoari opened this issue Jun 25, 2023 · 2 comments · Fixed by #4848
Assignees
Labels
bug Something isn't working

Comments

@taoari
Copy link

taoari commented Jun 25, 2023

Describe the bug

For gr.Chatbot(), If the response is a PDF (or other) file, the chatbot does not show anything.

import gradio as gr

with gr.Blocks() as demo:
    gr.Chatbot([
        (None, ("https://upload.wikimedia.org/wikipedia/commons/5/53/Sheba1.JPG",)), 
        (None, ("https://upload.wikimedia.org/wikipedia/commons/2/28/Caldhu.wav",)), 
        (None, ("https://www.africau.edu/images/default/sample.pdf",)), 
        (None, ("https://raw.githubusercontent.com/alecjacobson/common-3d-test-models/master/data/stanford-bunny.obj",)),
        (None, ("https://raw.githubusercontent.com/gradio-app/gradio/main/package.json",)), 
        (None, ("https://raw.githubusercontent.com/gradio-app/gradio/main/render_readme.py",)), 
    ]).style(height=1000)

demo.launch()

image

For the gr.File() widget, it actually shows the file name, file size, and download button. Can the chatbot at least do the same?

image

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

See above.

Screenshot

See above

Logs

No response

System Info

gradio                        3.35.2
windows 11
google chrome

Severity

Blocking usage of gradio

@taoari taoari added the bug Something isn't working label Jun 25, 2023
@taoari taoari mentioned this issue Jun 25, 2023
1 task
@dawoodkhan82 dawoodkhan82 self-assigned this Jun 25, 2023
@dawoodkhan82
Copy link
Collaborator

@taoari At the moment, chatbot supports images, audio, and video file types. You can provide your files as links as part of a regular chatbot message and the links will show up

@abidlabs
Copy link
Member

I think it'd be good to add general file support to chatbots -- we don't need the preview, but at least we could have the basic file info. WDYT @dawoodkhan82?

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
Development

Successfully merging a pull request may close this issue.

3 participants