diff --git a/main.py b/main.py index 5c3c5eb..91e9849 100644 --- a/main.py +++ b/main.py @@ -284,7 +284,6 @@ async def extract_info( ocr_text = "\n".join( [line[1][0] for res in result if res is not None for line in res] ) - print("ocr_text", ocr_text) # 提取信息 if extract_method == "re": if file_type == "patent": @@ -330,10 +329,8 @@ async def extract_info( conf.CHAT_API, json={"model": conf.CHAT_MODEL, "prompt": prompt, "stream": False}, ) - # info = json.loads((r.json()["response"])) try: - # info = json.loads(r.json()["response"]) - info = r.json().get("response", {}) + info = json.loads(r.json().get("response", {})) except json.JSONDecodeError as e: print(f"JSONDecodeError: {e}") return JSONResponse(content=info)