發表文章

目前顯示的是 2019的文章

[Debug] Code 502: Error as sending POST requests iteratively to OCR API deployed on Google App Engine

OCR Service Brief: POST a file -> OCR service interfaces API (on APP Engine) : encoded file as base64 string -> OCR backend engine Issue Description: An OCR service (Flask REST API) deployed on GAE (Google App Engine) cannot respond correctly when users use iteratively send POST requests. Sample code is shown below: for i, path in enumerate(path_list):     file_path = str(path)     perform_ocr(file_path)     #sleep(5) Debugging: Calling the service file by file separately doesn't occur errors. Service works well on the local laptop but has issues after being deployed on Google App Engine. Using sleep() function which can alleviate the issue but does not entirely solve it. The service would be stuck sometimes. After tracing the code, the error occurred as the OCR API server does not actually receive the POST file content but it does get the file name of the file. Therefore, OCR backend engine doesn't get the to-be-processed file and ...

How to write equation in Blogger?

1. Go to "Theme" and select one of the "Contempo" themes. 2. Click "Edit HTML" and paste below script under <head> tag.     <script type='text/x-mathjax-config'>     //<![CDATA[       MathJax.Hub.Config({         tex2jax: {           inlineMath: [ ['\$','\$'], ["\\(","\\)"] ],           displayMath: [ ['$$','$$'], ["\\[","\\]"] ],           processEscapes: true         },         "HTML-CSS": { availableFonts: ["TeX"] }       });     //]]>     </script> 3. Save theme. 4. Use $...$ to bracket the equation. E.g., $E=mc^2$ =>  $E=mc^2$ Ref:  https://support.google.com/blogger/forum/AAAAY7oIW-wcC761lmV8jA?authuser=0&msgid=CHFoXAQQAwAJ