-
Notifications
You must be signed in to change notification settings - Fork 2
ocr endpoint 변경 #137
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
ocr endpoint 변경 #137
Conversation
Summary of ChangesHello @inoray, 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 focuses on updating the configuration for the OCR service endpoint. The changes ensure that the application correctly connects to the designated OCR processing service by modifying the hardcoded endpoint URL in two relevant files. 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
이 PR은 OCR 엔드포인트 URL을 변경합니다. 하드코딩된 URL을 변경하는 대신, 설정을 중앙에서 관리하는 것이 좋습니다. 두 파일에서 하드코딩된 OCR 엔드포인트 URL을 발견했습니다. 이를 settings.py와 같은 설정 파일로 옮겨서 환경별로 쉽게 구성할 수 있도록 하는 것을 권장합니다. 이렇게 하면 코드의 유지보수성이 향상되고 다른 환경으로의 배포가 용이해집니다.
| initialize Document Converter | ||
| ''' | ||
| self.ocr_endpoint = "http://192.168.73.170:30880/ocr" | ||
| self.ocr_endpoint = "http://192.168.81.170:48080/ocr" |
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.
하드코딩된 OCR 엔드포인트 URL을 사용하고 있습니다. 이렇게 하면 개발, 테스트, 운영 등 여러 환경에 대한 구성을 관리하기 어렵습니다. 이 URL은 genon/preprocessor/src/common/settings.py의 Settings 클래스에 추가하고 거기서 불러오는 것이 좋습니다.
먼저 genon/preprocessor/src/common/settings.py 파일의 Settings 클래스에 OCR_ENDPOINT: str를 추가해야 합니다. 그런 다음 아래와 같이 코드를 수정할 수 있습니다. __import__를 사용하는 것은 한 줄로 제안하기 위한 방법이며, 실제로는 파일 상단에 from genon.preprocessor.src.common.settings import settings를 추가하는 것이 더 나은 방법입니다.
| self.ocr_endpoint = "http://192.168.81.170:48080/ocr" | |
| self.ocr_endpoint = __import__('genon.preprocessor.src.common.settings').settings.OCR_ENDPOINT |
| initialize Document Converter | ||
| ''' | ||
| self.ocr_endpoint = "http://192.168.73.170:30880/ocr" | ||
| self.ocr_endpoint = "http://192.168.81.170:48080/ocr" |
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.
하드코딩된 OCR 엔드포인트 URL을 사용하고 있습니다. 이렇게 하면 개발, 테스트, 운영 등 여러 환경에 대한 구성을 관리하기 어렵습니다. 이 URL은 genon/preprocessor/src/common/settings.py의 Settings 클래스에 추가하고 거기서 불러오는 것이 좋습니다.
먼저 genon/preprocessor/src/common/settings.py 파일의 Settings 클래스에 OCR_ENDPOINT: str를 추가해야 합니다. 그런 다음 아래와 같이 코드를 수정할 수 있습니다. __import__를 사용하는 것은 한 줄로 제안하기 위한 방법이며, 실제로는 파일 상단에 from genon.preprocessor.src.common.settings import settings를 추가하는 것이 더 나은 방법입니다.
| self.ocr_endpoint = "http://192.168.81.170:48080/ocr" | |
| self.ocr_endpoint = __import__('genon.preprocessor.src.common.settings').settings.OCR_ENDPOINT |
Checklist: