update endpoints
Browse files- api/main.py +8 -8
api/main.py
CHANGED
|
@@ -14,7 +14,7 @@ def home() -> dict:
|
|
| 14 |
return __response
|
| 15 |
|
| 16 |
@api.post("/texto_desde_web/", status_code=201)
|
| 17 |
-
def
|
| 18 |
__response=dict({"request_data":data})
|
| 19 |
try:
|
| 20 |
if data:
|
|
@@ -29,7 +29,7 @@ def get_text_from_url(data:dict) -> dict:
|
|
| 29 |
return __response
|
| 30 |
|
| 31 |
@api.post("/texto_desde_pdf/", status_code=201)
|
| 32 |
-
def
|
| 33 |
__response=dict({"request_data":data})
|
| 34 |
try:
|
| 35 |
if data:
|
|
@@ -44,7 +44,7 @@ def get_text_from_pdf(data:dict) -> dict:
|
|
| 44 |
return __response
|
| 45 |
|
| 46 |
@api.post("/generar_bloques/", status_code=201)
|
| 47 |
-
def
|
| 48 |
__response=dict({"request_data":data})
|
| 49 |
try:
|
| 50 |
if data:
|
|
@@ -61,7 +61,7 @@ def get_blocks(data:dict) -> dict:
|
|
| 61 |
return __response
|
| 62 |
|
| 63 |
@api.post("/traducir/", status_code=201)
|
| 64 |
-
def
|
| 65 |
__response=dict({"request_data":data})
|
| 66 |
try:
|
| 67 |
if data:
|
|
@@ -78,7 +78,7 @@ def get_traduccion(data:dict) -> dict:
|
|
| 78 |
return __response
|
| 79 |
|
| 80 |
@api.post("/resumir/", status_code=201)
|
| 81 |
-
def
|
| 82 |
__response=dict({"request_data":data})
|
| 83 |
try:
|
| 84 |
if data:
|
|
@@ -94,7 +94,7 @@ def get_resumen(data:dict) -> dict:
|
|
| 94 |
return __response
|
| 95 |
|
| 96 |
@api.post("/texto_a_imagen/", status_code=201)
|
| 97 |
-
def
|
| 98 |
__response=dict({"request_data":data})
|
| 99 |
try:
|
| 100 |
if data:
|
|
@@ -110,7 +110,7 @@ def get_text2img(data:dict) -> dict:
|
|
| 110 |
return __response
|
| 111 |
|
| 112 |
@api.post("/texto_a_video/", status_code=201)
|
| 113 |
-
def
|
| 114 |
__response=dict({"request_data":data})
|
| 115 |
try:
|
| 116 |
if data:
|
|
@@ -126,7 +126,7 @@ def get_text2video(data:dict) -> dict:
|
|
| 126 |
return __response
|
| 127 |
|
| 128 |
@api.post("/texto_a_audio/", status_code=201)
|
| 129 |
-
def
|
| 130 |
__response=dict({"request_data":data})
|
| 131 |
try:
|
| 132 |
if data:
|
|
|
|
| 14 |
return __response
|
| 15 |
|
| 16 |
@api.post("/texto_desde_web/", status_code=201)
|
| 17 |
+
def __get_text_from_url(data:dict) -> dict:
|
| 18 |
__response=dict({"request_data":data})
|
| 19 |
try:
|
| 20 |
if data:
|
|
|
|
| 29 |
return __response
|
| 30 |
|
| 31 |
@api.post("/texto_desde_pdf/", status_code=201)
|
| 32 |
+
def __get_text_from_pdf(data:dict) -> dict:
|
| 33 |
__response=dict({"request_data":data})
|
| 34 |
try:
|
| 35 |
if data:
|
|
|
|
| 44 |
return __response
|
| 45 |
|
| 46 |
@api.post("/generar_bloques/", status_code=201)
|
| 47 |
+
def __get_blocks(data:dict) -> dict:
|
| 48 |
__response=dict({"request_data":data})
|
| 49 |
try:
|
| 50 |
if data:
|
|
|
|
| 61 |
return __response
|
| 62 |
|
| 63 |
@api.post("/traducir/", status_code=201)
|
| 64 |
+
def __get_traduccion(data:dict) -> dict:
|
| 65 |
__response=dict({"request_data":data})
|
| 66 |
try:
|
| 67 |
if data:
|
|
|
|
| 78 |
return __response
|
| 79 |
|
| 80 |
@api.post("/resumir/", status_code=201)
|
| 81 |
+
def __get_resumen(data:dict) -> dict:
|
| 82 |
__response=dict({"request_data":data})
|
| 83 |
try:
|
| 84 |
if data:
|
|
|
|
| 94 |
return __response
|
| 95 |
|
| 96 |
@api.post("/texto_a_imagen/", status_code=201)
|
| 97 |
+
def __get_text2img(data:dict) -> dict:
|
| 98 |
__response=dict({"request_data":data})
|
| 99 |
try:
|
| 100 |
if data:
|
|
|
|
| 110 |
return __response
|
| 111 |
|
| 112 |
@api.post("/texto_a_video/", status_code=201)
|
| 113 |
+
def __get_text2video(data:dict) -> dict:
|
| 114 |
__response=dict({"request_data":data})
|
| 115 |
try:
|
| 116 |
if data:
|
|
|
|
| 126 |
return __response
|
| 127 |
|
| 128 |
@api.post("/texto_a_audio/", status_code=201)
|
| 129 |
+
def __get_text2speach(data:dict) -> dict:
|
| 130 |
__response=dict({"request_data":data})
|
| 131 |
try:
|
| 132 |
if data:
|