-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fixes #298 This PR enhances generative QA widget support. By making the score field optional in the output structure, it improves flexibility for scenarios without scores. The validation and parsing functions align with the updated structure, ensuring accuracy. Additionally, the user interface now displays scores only when available, enhancing the user experience. These changes provide a more adaptable and user-friendly widget. Test screenshots attached `impira/layoutlm-document-qa` <img width="499" alt="impira:layoutlm-document-qa" src="https://github.com/huggingface/huggingface.js/assets/22408440/8922301e-f3f1-475d-8bae-c4023052c81c"> `naver-clova-ix/donut-base-finetuned-docvqa` <img width="484" alt="naver-clova-ix:donut-base-finetuned-docvga" src="https://github.com/huggingface/huggingface.js/assets/22408440/26d501f5-4cd6-4a0b-8f35-b34a14be9b4e"> --------- Co-authored-by: Eliott C <[email protected]>
- Loading branch information
1 parent
cf06145
commit dc0ce01
Showing
2 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters