support keras

This commit is contained in:
2023-02-05 14:21:12 +10:00
parent 9404df9a1d
commit 305c018d39

View File

@@ -176,7 +176,7 @@ class OCRController extends ApiController
imagedestroy($imgcreate);
// keras
$cmd = 'python3 ' . base_path() . '/scripts/keras.py ' . base64_encode(file_get_contents($tmpfname));
$cmd = 'python3 ' . base_path() . '/scripts/keras_oc.py ' . $url;
$command = escapeshellcmd($cmd); #no special characters it will work
$data['ocr']['keras'] = shell_exec($command);