HycJack commited on
Commit
0125000
1 Parent(s): 5bf1b3e
Files changed (1) hide show
  1. main.py +4 -7
main.py CHANGED
@@ -1,15 +1,12 @@
1
  from fastapi import FastAPI, File, UploadFile
2
-
3
- app = FastAPI()
4
  from rapidocr_onnxruntime import RapidOCR
5
-
 
6
  # det_model_path同理
7
  model = RapidOCR()
8
 
9
-
10
- # 1、导入对应的包
11
- from fastapi.middleware.cors import CORSMiddleware
12
-
13
  app = FastAPI()
14
 
15
  # 2、声明一个 源 列表;重点:要包含跨域的客户端 源
 
1
  from fastapi import FastAPI, File, UploadFile
2
+ from PIL import Image
3
+ from fastapi.middleware.cors import CORSMiddleware
4
  from rapidocr_onnxruntime import RapidOCR
5
+ import io
6
+ import numpy as np
7
  # det_model_path同理
8
  model = RapidOCR()
9
 
 
 
 
 
10
  app = FastAPI()
11
 
12
  # 2、声明一个 源 列表;重点:要包含跨域的客户端 源