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

Why data incompatible with tuples format? #50

Open
FlyerW opened this issue Jan 2, 2025 · 0 comments
Open

Why data incompatible with tuples format? #50

FlyerW opened this issue Jan 2, 2025 · 0 comments

Comments

@FlyerW
Copy link

FlyerW commented Jan 2, 2025

image

Dear Maintainers,

First of all, thank you for your amazing work on this project. I hope you are having a great holiday season and Happy New Year! 🎉
I encountered an issue while running the following command:
python -m demo.app --resume_from_checkpoint chenjoya/videollm-online-8b-v1plus

The application starts correctly, and I can access the Gradio interface at the provided URL. However, when interacting with the chatbot, I receive the following error message:
gradio.exceptions.Error: 'Data incompatible with tuples format. Each message should be a list of length 2.'

The chatbot raises an exception related to an incompatible data format. It seems the returned data does not match the expected tuples format.

Additional Information:
Python version: 3.12
Gradio version: 5.7.1

Traceback (most recent call last): File "/local/sean/miniconda3/lib/python3.12/site-packages/gradio/queueing.py", line 624, in process_events response = await route_utils.call_process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/local/sean/miniconda3/lib/python3.12/site-packages/gradio/route_utils.py", line 323, in call_process_api output = await app.get_blocks().process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/local/sean/miniconda3/lib/python3.12/site-packages/gradio/blocks.py", line 2029, in process_api data = await self.postprocess_data(block_fn, result["prediction"], state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/local/sean/miniconda3/lib/python3.12/site-packages/gradio/blocks.py", line 1835, in postprocess_data prediction_value = block.postprocess(prediction_value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/local/sean/miniconda3/lib/python3.12/site-packages/gradio/components/chatbot.py", line 551, in postprocess self._check_format(value, "tuples") File "/local/sean/miniconda3/lib/python3.12/site-packages/gradio/components/chatbot.py", line 349, in _check_format raise Error( gradio.exceptions.Error: 'Data incompatible with tuples format. Each message should be a list of length 2.'

Could you help me identify the correct format for the chatbot data? Should I modify the chatbot response to use the new messages format with keys role and content, as suggested in the warning message?

Thank you for your time and assistance! I wish you a wonderful new year. 🎊

Best regards,
Sean

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

1 participant