root
		
	commited on
		
		
					Commit 
							
							·
						
						f2998c3
	
1
								Parent(s):
							
							feb46ff
								
update link
Browse files
    	
        app.py
    CHANGED
    
    | 
         @@ -38,6 +38,7 @@ def image_to_base64_data_url(filepath: str) -> str: 
     | 
|
| 38 | 
         
             
                    print(f"Error encoding image to Base64: {e}")
         
     | 
| 39 | 
         
             
                    return ""
         
     | 
| 40 | 
         | 
| 
         | 
|
| 41 | 
         
             
            def _get_examples_from_dir(dir_path: str) -> List[List[str]]:
         
     | 
| 42 | 
         
             
                supported_exts = {".png", ".jpg", ".jpeg", ".bmp", ".webp"}
         
     | 
| 43 | 
         
             
                examples = []
         
     | 
| 
         @@ -247,7 +248,7 @@ with gr.Blocks(head=GOOGLE_FONTS_URL, css=custom_css, theme=gr.themes.Soft()) as 
     | 
|
| 247 | 
         
             
                logo_data_url = image_to_base64_data_url(LOGO_IMAGE_PATH) if os.path.exists(LOGO_IMAGE_PATH) else ""
         
     | 
| 248 | 
         
             
                gr.HTML(f"""<div class="app-header"><img src="{logo_data_url}" alt="App Logo" style="max-height:10%; width: auto; margin: 10px auto; display: block;"></div>""")
         
     | 
| 249 | 
         
             
                gr.HTML("""<div class="notice"><strong>Heads up:</strong> The Hugging Face demo can be slow at times. For a faster experience, please try <a href="https://aistudio.baidu.com/application/detail/98365" target="_blank" rel="noopener noreferrer">Baidu AI Studio</a> or <a href="https://modelscope.cn/studios/PaddlePaddle/PaddleOCR-VL_Online_Demo/summary" target="_blank" rel="noopener noreferrer">ModelScope</a>.</div>""")
         
     | 
| 250 | 
         
            -
                gr.HTML("""<div class="quick-links"><a href="https://github.com/PaddlePaddle/PaddleOCR" target="_blank">GitHub</a> | <a href="https://ernie.baidu.com/blog/publication/PaddleOCR-VL_Technical_Report.pdf" target="_blank">Technical Report</a> | <a href="https://huggingface.co/ 
     | 
| 251 | 
         | 
| 252 | 
         
             
                with gr.Tabs():
         
     | 
| 253 | 
         
             
                    with gr.Tab("Document Parsing"):
         
     | 
| 
         | 
|
| 38 | 
         
             
                    print(f"Error encoding image to Base64: {e}")
         
     | 
| 39 | 
         
             
                    return ""
         
     | 
| 40 | 
         | 
| 41 | 
         
            +
             
     | 
| 42 | 
         
             
            def _get_examples_from_dir(dir_path: str) -> List[List[str]]:
         
     | 
| 43 | 
         
             
                supported_exts = {".png", ".jpg", ".jpeg", ".bmp", ".webp"}
         
     | 
| 44 | 
         
             
                examples = []
         
     | 
| 
         | 
|
| 248 | 
         
             
                logo_data_url = image_to_base64_data_url(LOGO_IMAGE_PATH) if os.path.exists(LOGO_IMAGE_PATH) else ""
         
     | 
| 249 | 
         
             
                gr.HTML(f"""<div class="app-header"><img src="{logo_data_url}" alt="App Logo" style="max-height:10%; width: auto; margin: 10px auto; display: block;"></div>""")
         
     | 
| 250 | 
         
             
                gr.HTML("""<div class="notice"><strong>Heads up:</strong> The Hugging Face demo can be slow at times. For a faster experience, please try <a href="https://aistudio.baidu.com/application/detail/98365" target="_blank" rel="noopener noreferrer">Baidu AI Studio</a> or <a href="https://modelscope.cn/studios/PaddlePaddle/PaddleOCR-VL_Online_Demo/summary" target="_blank" rel="noopener noreferrer">ModelScope</a>.</div>""")
         
     | 
| 251 | 
         
            +
                gr.HTML("""<div class="quick-links"><a href="https://github.com/PaddlePaddle/PaddleOCR" target="_blank">GitHub</a> | <a href="https://ernie.baidu.com/blog/publication/PaddleOCR-VL_Technical_Report.pdf" target="_blank">Technical Report</a> | <a href="https://huggingface.co/PaddlePaddle/PaddleOCR-VL" target="_blank">Model</a></div>""")
         
     | 
| 252 | 
         | 
| 253 | 
         
             
                with gr.Tabs():
         
     | 
| 254 | 
         
             
                    with gr.Tab("Document Parsing"):
         
     | 
    	
        examples/complex/{0a79472d2d5a4eb665f03577ffd13e86.png → bfb50c8b331a6e6c22cbb05b9808fae8.png}
    RENAMED
    
    | 
										 
											File without changes
										 
									 |