changed names according to FE
Browse files
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-
|
40 |
-
async def ProcessDocument(
|
41 |
-
str_as_bytes = str.encode(
|
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)
|