Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -102,31 +102,19 @@ def inference(img_path, box_thresh=0.5, unclip_ratio=1.6, text_score=0.5):
|
|
102 |
|
103 |
title = 'RapidOCR Demo (捷智OCR)'
|
104 |
description = """Github Repo: [RapidOCR](https://github.com/RapidAI/RapidOCR)
|
|
|
105 |
Docs: [Docs](https://rapidocr.rtfd.io/)
|
|
|
106 |
Parameters docs: [link](https://github.com/RapidAI/RapidOCR/tree/main/python#configyaml%E4%B8%AD%E5%B8%B8%E7%94%A8%E5%8F%82%E6%95%B0%E4%BB%8B%E7%BB%8D)
|
107 |
|
108 |
box_thresh: 检测到的框是文本的概率,值越大,框中是文本的概率就越大。存在漏检时,调低该值。取值范围:[0, 1.0]
|
|
|
109 |
unclip_ratio: 控制文本检测框的大小,值越大,检测框整体越大。在出现框截断文字的情况,调大该值。取值范围:[1.5, 2.0]
|
|
|
110 |
text_score: 文本识别结果是正确的置信度,值越大,显示出的识别结果更准确。存在漏检时,调低该值。取值范围:[0, 1.0]
|
111 |
"""
|
112 |
|
113 |
article = """<p style='text-align: center'> Completely open source, free and support offline deployment of multi-platform and multi-language OCR SDK <a href='https://github.com/RapidAI/RapidOCR'>Github Repo</a></p>
|
114 |
-
<p align="left">
|
115 |
-
<a href="https://rapidai.deepdatasec.com:9003/" target="_blank"><img src="https://img.shields.io/badge/%E2%9A%A1%EF%B8%8E-Online%20Demo-blue"></a>
|
116 |
-
<a href="https://huggingface.co/spaces/SWHL/RapidOCRDemo" target="_blank"><img src="https://img.shields.io/badge/%F0%9F%A4%97-Hugging Face Demo-blue"></a>
|
117 |
-
<a href="https://colab.research.google.com/github/RapidAI/RapidOCR/blob/main/assets/RapidOCRDemo.ipynb" target="_blank"><img src="https://raw.githubusercontent.com/RapidAI/RapidOCR/main/assets/colab-badge.svg" alt="Open in Colab"></a>
|
118 |
-
<a href="https://aistudio.baidu.com/aistudio/projectdetail/4444785?sUid=57084&shared=1&ts=1660896122332" target="_blank"><img src="https://img.shields.io/badge/PP-Open in AI Studio-blue.svg"></a><br/>
|
119 |
-
<a href=""><img src="https://img.shields.io/badge/Python->=3.7,<=3.10-aff.svg"></a>
|
120 |
-
<a href=""><img src="https://img.shields.io/badge/OS-Linux%2C%20Win%2C%20Mac-pink.svg"></a>
|
121 |
-
<a href="https://github.com/RapidAI/RapidOCR/graphs/contributors"><img src="https://img.shields.io/github/contributors/RapidAI/RapidOCR?color=9ea"></a>
|
122 |
-
<a href="https://pepy.tech/project/rapidocr_onnxruntime"><img src="https://static.pepy.tech/personalized-badge/rapidocr_onnxruntime?period=total&units=abbreviation&left_color=grey&right_color=blue&left_text=Downloads%20Ort"></a>
|
123 |
-
<a href="https://pypi.org/project/rapidocr-onnxruntime/"><img alt="PyPI" src="https://img.shields.io/pypi/v/rapidocr-onnxruntime"></a>
|
124 |
-
<a href="https://github.com/RapidAI/RapidOCR/stargazers"><img src="https://img.shields.io/github/stars/RapidAI/RapidOCR?color=ccf"></a>
|
125 |
-
<a href="https://semver.org/"><img alt="SemVer2.0" src="https://img.shields.io/badge/SemVer-2.0-brightgreen"></a>
|
126 |
-
<a href='https://rapidocr.readthedocs.io/en/latest/?badge=latest'>
|
127 |
-
<img src='https://readthedocs.org/projects/rapidocr/badge/?version=latest' alt='Documentation Status' />
|
128 |
-
</a>
|
129 |
-
</p>
|
130 |
"""
|
131 |
css = ".output_image, .input_image {height: 40rem !important; width: 100% !important;}"
|
132 |
examples = [['images/1.jpg']]
|
|
|
102 |
|
103 |
title = 'RapidOCR Demo (捷智OCR)'
|
104 |
description = """Github Repo: [RapidOCR](https://github.com/RapidAI/RapidOCR)
|
105 |
+
|
106 |
Docs: [Docs](https://rapidocr.rtfd.io/)
|
107 |
+
|
108 |
Parameters docs: [link](https://github.com/RapidAI/RapidOCR/tree/main/python#configyaml%E4%B8%AD%E5%B8%B8%E7%94%A8%E5%8F%82%E6%95%B0%E4%BB%8B%E7%BB%8D)
|
109 |
|
110 |
box_thresh: 检测到的框是文本的概率,值越大,框中是文本的概率就越大。存在漏检时,调低该值。取值范围:[0, 1.0]
|
111 |
+
|
112 |
unclip_ratio: 控制文本检测框的大小,值越大,检测框整体越大。在出现框截断文字的情况,调大该值。取值范围:[1.5, 2.0]
|
113 |
+
|
114 |
text_score: 文本识别结果是正确的置信度,值越大,显示出的识别结果更准确。存在漏检时,调低该值。取值范围:[0, 1.0]
|
115 |
"""
|
116 |
|
117 |
article = """<p style='text-align: center'> Completely open source, free and support offline deployment of multi-platform and multi-language OCR SDK <a href='https://github.com/RapidAI/RapidOCR'>Github Repo</a></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
"""
|
119 |
css = ".output_image, .input_image {height: 40rem !important; width: 100% !important;}"
|
120 |
examples = [['images/1.jpg']]
|