Reinicio
Browse files- __pycache__/app.cpython-311.pyc +0 -0
- __pycache__/funciones.cpython-311.pyc +0 -0
- app.py +4 -4
- funciones.py +1 -3
__pycache__/app.cpython-311.pyc
DELETED
Binary file (2.5 kB)
|
|
__pycache__/funciones.cpython-311.pyc
DELETED
Binary file (1.89 kB)
|
|
app.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
from io import BytesIO
|
2 |
import funciones
|
|
|
3 |
from fastapi import FastAPI, Form
|
4 |
from fastapi import FastAPI, File, UploadFile
|
5 |
-
from fastapi.responses import StreamingResponse,
|
6 |
|
7 |
app = FastAPI()
|
8 |
|
@@ -31,8 +31,8 @@ async def echo_image(image: UploadFile = File(...)):
|
|
31 |
|
32 |
@app.post(
|
33 |
"/procesa_documento/",
|
34 |
-
tags=["
|
35 |
-
summary="
|
36 |
async def procesa_documento(image: UploadFile = File(...)):
|
37 |
if not image.content_type.startswith("image/"):
|
38 |
return {"error": "El archivo no es una imagen"}
|
|
|
|
|
1 |
import funciones
|
2 |
+
from io import BytesIO
|
3 |
from fastapi import FastAPI, Form
|
4 |
from fastapi import FastAPI, File, UploadFile
|
5 |
+
from fastapi.responses import StreamingResponse, JSONResponse
|
6 |
|
7 |
app = FastAPI()
|
8 |
|
|
|
31 |
|
32 |
@app.post(
|
33 |
"/procesa_documento/",
|
34 |
+
tags=["Documentos"],
|
35 |
+
summary="Reconocimiento Avanzado de Documentos")
|
36 |
async def procesa_documento(image: UploadFile = File(...)):
|
37 |
if not image.content_type.startswith("image/"):
|
38 |
return {"error": "El archivo no es una imagen"}
|
funciones.py
CHANGED
@@ -52,6 +52,4 @@ async def procesa_documento(image):
|
|
52 |
#nombre, apellido, identificacion, fecha_nacimiento, sexo = None, None, None, None, None
|
53 |
return {
|
54 |
"error": "El documento no es un dni o pasaporte válido o requiere ser más legible.",
|
55 |
-
}
|
56 |
-
|
57 |
-
|
|
|
52 |
#nombre, apellido, identificacion, fecha_nacimiento, sexo = None, None, None, None, None
|
53 |
return {
|
54 |
"error": "El documento no es un dni o pasaporte válido o requiere ser más legible.",
|
55 |
+
}
|
|
|
|