Files
project_main/test/test_ocr.py
bmy f3bb720bed feat: 增加base64传入动作指令
feat: 换用 deepseek 大模型
pref: 修改应急避险2停车条件
2024-08-04 10:04:27 +08:00

27 lines
489 B
Python

import zmq
context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect("tcp://localhost:6668")
filter_w = (213, 540)
filter_h = (120, 360)
while True:
a = input("")
socket.send_string("")
resp = socket.recv_pyobj()
print(resp)
if resp.get('code') == 0:
text = ''
for item in resp.get('content'):
if item['probability']['average'] < 0.80:
continue
text += item['words']
print(text)