Commit 103dd785 by unknown

init

parent 36d45731
......@@ -19,7 +19,7 @@ conda虚拟环境:conda activate search_book
```
准备工作:
1、将习题图书拆分为独立的一张张图片,
2、后端对整本书进行解析,得到每个题的ocr结果,以及整张图片的paddleOCR结果,整理为一个excel文档,通过接口上传进es数据库(excel文档样例:)
2、后端对整本书进行解析,得到每个题的ocr结果,以及整张图片的paddleOCR结果,整理为一个excel文档,通过接口上传进es数据库(excel文档样例:“12670279-2025版《锦上添花(期末大赢家)》下册.xlsx”
流程:
......@@ -30,9 +30,11 @@ conda虚拟环境:conda activate search_book
```
#### 3、接口
```
```python
# 1、excel数据插入es数据库接口
def insert_excel(data):
......@@ -55,12 +57,15 @@ def insert_excel(data):
print(f"响应内容: {response.json()}")
data = {'book_id': '12663121', 'book_name': '衔接教材地理', "file_path": '12663121-衔接教材 地理.pdf.xlsx' }
data = {'book_id': '12670279', 'book_name': '衔接教材地理', "file_path": '12670279-2025版《锦上添花(期末大赢家)》下册.xlsx' }
insert_excel(data)
```
```
```python
# 2、依据 book_id 删除es库中整本书所有数据 接口
def delete_es_book(book_id="12663121"):
......@@ -87,7 +92,9 @@ book_id = "12667382"
delete_es_book(book_id)
```
```
```python
# 3、搜图搜题接口
def search_book_question(book_id, image_ocr):
......@@ -122,11 +129,9 @@ print(res)
#### 4、启动服务
```
```linux
# 61.170.32.8 服务器
$ cd /home/liuxin/work/search_book
$ conda activate search_book
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment