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

Fix InferenceClient.image_to_text output value #2285

Merged
merged 1 commit into from
May 27, 2024
Merged

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented May 21, 2024

Fix #2273. For what I understand, server sometimes return an object, sometimes a list with one object, depending on the model framework/architecture. This PR fixes it client-side to always return a single item.

Also re-added a test about it.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Impressive cassette

@Wauplin
Copy link
Contributor Author

Wauplin commented May 27, 2024

Impressive cassette

Ahah, took me 4 days to write it manually, I swear! 😄

Thanks for the review!

@Wauplin Wauplin merged commit bf6011b into main May 27, 2024
13 of 16 checks passed
@Wauplin Wauplin deleted the 2273-fix-image-to-text branch May 27, 2024 16:36
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

Successfully merging this pull request may close these issues.

Invalid input data for ImageToTextOutput: Expected a single instance, but got a list.
3 participants