kavg commited on
Commit
9d6cf42
1 Parent(s): 0d655c9

changed names according to FE

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -36,9 +36,9 @@ async def ProcessDocument(file: UploadFile):
36
  reOutput = ExtractRelations(tokenClassificationOutput, ocr_df, img_size)
37
  return reOutput
38
 
39
- @app.post("/submit-doc-mobile")
40
- async def ProcessDocument(base64str: str = Form(...)):
41
- str_as_bytes = str.encode(base64str)
42
  content = b64decode(str_as_bytes)
43
  tokenClassificationOutput, ocr_df, img_size = LabelTokens(content)
44
  reOutput = ExtractRelations(tokenClassificationOutput, ocr_df, img_size)
 
36
  reOutput = ExtractRelations(tokenClassificationOutput, ocr_df, img_size)
37
  return reOutput
38
 
39
+ @app.post("/submit-doc-base64")
40
+ async def ProcessDocument(file: str = Form(...)):
41
+ str_as_bytes = str.encode(file)
42
  content = b64decode(str_as_bytes)
43
  tokenClassificationOutput, ocr_df, img_size = LabelTokens(content)
44
  reOutput = ExtractRelations(tokenClassificationOutput, ocr_df, img_size)