-
Notifications
You must be signed in to change notification settings - Fork 1k
[docs] update deepseek_ocr docs #6242
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
[docs] update deepseek_ocr docs #6242
Conversation
Summary of ChangesHello @Jintao-Huang, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request primarily focuses on enhancing the examples and documentation for the DeepSeek-OCR model. It introduces a dedicated Python script to showcase inference capabilities, updates an existing best practices guide by adjusting a debug setting, and refactors the naming and location of a DeepSeek-OCR training script for better organization and clarity. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds documentation and example scripts for using the DeepSeek-OCR model. The changes include a new inference script, a new training script, and a minor update to an existing documentation file. My review focuses on improving the clarity and completeness of the new example scripts. I've suggested adding a missing dependency to the installation instructions in infer.py and printing an unused result to make the script more demonstrative. Note that the training script examples/models/deepseek_ocr/train.sh is also missing the easydict dependency in its installation command.
| @@ -0,0 +1,29 @@ | |||
| # pip install "transformers==4.46.3" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deepseek-ocr model also requires the easydict package, as specified in its model registration. It would be good to include it in the installation instructions to ensure the example runs smoothly for users.
| # pip install "transformers==4.46.3" | |
| # pip install "transformers==4.46.3" "easydict" |
| 'role': 'user', | ||
| # or | ||
| 'content': '<image>Free OCR.', | ||
| # "content": '<image><|grounding|>Convert the document to markdown.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The result from the non-streaming inference is stored in the response variable but is never printed. It would be helpful to print it to demonstrate the output of this inference mode, similar to how the streaming result is handled.
| # "content": '<image><|grounding|>Convert the document to markdown.', | |
| response = resp_list[0].choices[0].message.content | |
| print('Non-streaming response:') | |
| print(response) |
No description provided.