docs: update Google Colab demo

This commit is contained in:
SWHL committed 2025-06-20 08:09:18 +08:00
1 parent 4462bb13b1
commit f354440c47
1 file changed
+62 -62
+62 -62
View File
@@ -18,23 +18,23 @@
"id": "0qapeJlG6JFJ"
},
"source": [
"#### Install rapidocr_onnxruntime"
"#### Install rapidocr"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"id": "sTB1PsMp6XTT",
"outputId": "47d2f7d9-6c5f-4269-d872-3b9bfa385161",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"id": "sTB1PsMp6XTT",
"outputId": "47d2f7d9-6c5f-4269-d872-3b9bfa385161"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"Collecting rapidocr\n",
" Downloading rapidocr-3.2.0-py3-none-any.whl.metadata (1.2 kB)\n",
@@ -109,8 +109,8 @@
},
"outputs": [
{
"output_type": "stream",
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m[INFO] 2025-06-19 13:01:55,418 [RapidOCR] base.py:24: Using engine_name: onnxruntime\u001b[0m\n",
"\u001b[32m[INFO] 2025-06-19 13:01:55,466 [RapidOCR] download_file.py:56: File exists and is valid: /usr/local/lib/python3.11/dist-packages/rapidocr/models/ch_PP-OCRv4_det_infer.onnx\u001b[0m\n",
@@ -125,8 +125,8 @@
]
},
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"RapidOCROutput(img=array([[[255, 255, 255],\n",
" [255, 255, 255],\n",
@@ -193,8 +193,8 @@
]
},
{
"output_type": "stream",
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m[INFO] 2025-06-19 13:02:01,302 [RapidOCR] download_file.py:78: Download size: 3.09MB\u001b[0m\n",
"\u001b[32m[INFO] 2025-06-19 13:02:04,440 [RapidOCR] download_file.py:91: Successfully saved to: /usr/local/lib/python3.11/dist-packages/rapidocr/models/FZYTK.TTF\u001b[0m\n",
@@ -202,59 +202,7 @@
]
},
{
"output_type": "execute_result",
"data": {
"text/plain": [
"array([[[255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" ...,\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255]],\n",
"\n",
" [[255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" ...,\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255]],\n",
"\n",
" [[255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" ...,\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255]],\n",
"\n",
" ...,\n",
"\n",
" [[255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" ...,\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255]],\n",
"\n",
" [[255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" ...,\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255]],\n",
"\n",
" [[255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" ...,\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255]]], dtype=uint8)"
],
"text/html": [
"<style>\n",
" .ndarray_repr .ndarray_raw_data {\n",
@@ -328,10 +276,62 @@
" }\n",
" })();\n",
" </script>"
],
"text/plain": [
"array([[[255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" ...,\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255]],\n",
"\n",
" [[255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" ...,\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255]],\n",
"\n",
" [[255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" ...,\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255]],\n",
"\n",
" ...,\n",
"\n",
" [[255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" ...,\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255]],\n",
"\n",
" [[255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" ...,\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255]],\n",
"\n",
" [[255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" ...,\n",
" [255, 255, 255],\n",
" [255, 255, 255],\n",
" [255, 255, 255]]], dtype=uint8)"
]
},
"execution_count": 2,
"metadata": {},
"execution_count": 2
"output_type": "execute_result"
}
],
"source": [
@@ -386,4 +386,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}