Download test_speed.py from borreooo/ocr: direct link, hf CLI and curl.
- Browser
- Download file 328 Bytes
-
https://huggingface.co/spaces/borreooo/ocr/resolve/main/test_speed.py
- Command line
-
hf download hf://spaces/borreooo/ocr/test_speed.py
-
curl -L -o test_speed.py https://huggingface.co/spaces/borreooo/ocr/resolve/main/test_speed.py
328 Bytes
| import time | |
| from ocr import read_chassis | |
| start = time.time() | |
| text, conf = read_chassis("images/chassis/26995.jpg") | |
| end = time.time() | |
| print(f"First run : {text} | {end - start:.2f}s") | |
| start = time.time() | |
| text, conf = read_chassis("images/chassis/26995.jpg") | |
| end = time.time() | |
| print(f"Second run : {text} | {end - start:.2f}s") |