alessandro trinca tornidor
commited on
Commit
•
81306d4
1
Parent(s):
e601377
bug: fix infer_lisa() because of the body dumped to json two times
Browse files
app.py
CHANGED
@@ -177,8 +177,10 @@ def infer_lisa_gradio(request_input: StringPromptApiRequestBody) -> JSONResponse
|
|
177 |
|
178 |
@app.post("/infer_lisa")
|
179 |
def infer_lisa(request_input: StringPromptApiRequestBody) -> JSONResponse:
|
180 |
-
|
181 |
-
|
|
|
|
|
182 |
|
183 |
|
184 |
@app.post("/infer_samgis")
|
|
|
177 |
|
178 |
@app.post("/infer_lisa")
|
179 |
def infer_lisa(request_input: StringPromptApiRequestBody) -> JSONResponse:
|
180 |
+
dumped = infer_lisa_gradio(request_input=request_input)
|
181 |
+
app_logger.info(f"json.dumps(body) type:{type(dumped)}, len:{len(dumped)}.")
|
182 |
+
app_logger.debug(f"complete json.dumps(body):{dumped}.")
|
183 |
+
return JSONResponse(status_code=200, content={"body": dumped})
|
184 |
|
185 |
|
186 |
@app.post("/infer_samgis")
|