Skip to content

Commit

Permalink
fix: revert to spring pointer api
Browse files Browse the repository at this point in the history
  • Loading branch information
shinsj4653 committed Feb 24, 2024
1 parent 296467d commit fda362d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions OCR/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class Image(BaseModel) :
imageUrl: str

class Pointer(BaseModel) :
imagefile: UploadFile
# imageUrl: str
# imagefile: UploadFile
imageUrl: str
# x : int
# y : int

Expand All @@ -34,13 +34,13 @@ async def image_to_text(image: Image):


# URL 로 이미지를 받아서 텍스트로 변환
# @app.post("/image/pointer")
# async def image_to_text(pointer: Pointer):
# return handLandmark.text_pointer_uri(pointer.imageUrl)
@app.post("/image/pointer")
async def image_to_text(pointer: Pointer):
return handLandmark.text_pointer_uri(pointer.imageUrl)


# 이미지 파일을 받아서 텍스트로 변환
@app.post("/image/pointer")
async def image_to_text(pointer: Pointer):
return handLandmark.text_pointer_file(pointer.imagefile)
# @app.post("/image/pointer")
# async def image_to_text(pointer: Pointer):
# return handLandmark.text_pointer_file(pointer.imagefile)

0 comments on commit fda362d

Please sign in to comment.