From 0e1870c9fa918fb4ae1c042a1308fefa5d3217f5 Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Mon, 1 Sep 2025 11:16:24 +0800 Subject: [PATCH] 'commit' --- dsLightRag/Util/ShiTiRecognizer.py | 3 +- dsLightRag/Util/ShouXieShiBie.py | 1 + .../ShiTiRecognizer.cpython-310.pyc | Bin 5378 -> 5382 bytes .../static/RecognizeEduQuestionOcr.html | 361 +++++++++++------- 4 files changed, 228 insertions(+), 137 deletions(-) create mode 100644 dsLightRag/Util/ShouXieShiBie.py diff --git a/dsLightRag/Util/ShiTiRecognizer.py b/dsLightRag/Util/ShiTiRecognizer.py index 6c8e5ff0..a0c5d6a3 100644 --- a/dsLightRag/Util/ShiTiRecognizer.py +++ b/dsLightRag/Util/ShiTiRecognizer.py @@ -165,7 +165,8 @@ if __name__ == '__main__': try: recognizer = ShiTiRecognizer() # 传入固定的图片URL - image_url = "https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/Backup/ShiTi.jpg" + #image_url = "https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/Backup/ShiTi.jpg" + image_url="https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/Backup/ShouXieTi.jpg" result = recognizer.recognize_question(image_url) print("识别结果:") diff --git a/dsLightRag/Util/ShouXieShiBie.py b/dsLightRag/Util/ShouXieShiBie.py new file mode 100644 index 00000000..feb7bf65 --- /dev/null +++ b/dsLightRag/Util/ShouXieShiBie.py @@ -0,0 +1 @@ +# https://cloud.baidu.com/product/ocr_education diff --git a/dsLightRag/Util/__pycache__/ShiTiRecognizer.cpython-310.pyc b/dsLightRag/Util/__pycache__/ShiTiRecognizer.cpython-310.pyc index fea2efaf66887388e9cd8fd918db2b5510d0849d..e1ad839553c9b33cf03d33b060e5d10ce9e87a52 100644 GIT binary patch delta 47 zcmZqDYSZG)=jG*M00IrRtr8KRKM+x6d 教育场景识别 - + @@ -25,6 +25,38 @@ background-color: #f5f5f5; } + .tab-container { + display: flex; + border-bottom: 1px solid #ccc; + margin-bottom: 20px; + } + + .tab-button { + padding: 10px 20px; + border: none; + background: #f1f1f1; + cursor: pointer; + transition: all 0.3s ease; + } + + .tab-button.active { + background: #4CAF50; + color: white; + } + + .tab-button:hover:not(.active) { + background: #ddd; + } + + .tab-content { + display: none; + padding: 10px; + } + + .tab-content.active { + display: block; + } + .container { max-width: 1200px; margin: 0 auto; @@ -181,6 +213,7 @@ background-color: #f9f9f9; line-height: 1.8; /* 优化行高 */ } + .option-item { margin: 8px 0; /* 为选项添加上下间距 */ background-color: #f9f9f9; @@ -212,7 +245,7 @@ animation: spin 1s linear infinite !important; margin-bottom: 10px; } - + .result-area { margin-top: 20px; min-height: 200px; @@ -224,14 +257,19 @@ position: relative; /* 关键:作为动画容器的定位基准 */ overflow: hidden; /* 防止动画溢出 */ } + .option-item { margin: 8px 0; /* 为选项添加上下间距 */ background-color: #f9f9f9; } @keyframes spin { - 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } } /* 图片模态框样式 */ @@ -245,7 +283,7 @@ width: 100%; height: 100%; overflow: auto; - background-color: rgba(0,0,0,0.9); + background-color: rgba(0, 0, 0, 0.9); } .modal-content { @@ -276,58 +314,51 @@

教育场景识别

- - + + +
- -
-
-

示例公式图片

-
-
- 公式示例1 -
数学公式示例
-
-
-
+ +
公式识别内容...
+
试题识别内容...
+
手写识别内容...
-
-

公式识别

-
-
- - -
-
-
识别结果将在此处显示
-
+
+

示例公式图片

+
+
+ 公式示例1 +
数学公式示例
- -
-
-

示例试题图片

-
-
- 试题示例1 -
试题示例
-
+
+

公式识别

+
+
+ + +
+
+
识别结果将在此处显示
+
-
-

试题识别

-
-
- - -
-
-
识别结果将在此处显示
-
+
+

试题识别

+
+
+ + +
+
+
识别结果将在此处显示
@@ -350,13 +381,13 @@ processEscapes: true, packages: {'[+]': ['ams']} }, - svg: { fontCache: 'global' }, - startup: { pageReady: pageReady } + svg: {fontCache: 'global'}, + startup: {pageReady: pageReady} }; // MathJax 加载完成后执行 function pageReady() { - return MathJax.startup.defaultPageReady().then(function() { + return MathJax.startup.defaultPageReady().then(function () { console.log('MathJax 3 加载完成'); }); } @@ -367,15 +398,36 @@ \ No newline at end of file +