Spaces:
Sleeping
Sleeping
Download scratch_check_boxes.py from vamsi1103/flask-ocr-api: direct link, hf CLI and curl.
- Browser
- Download file 455 Bytes
-
https://huggingface.co/spaces/vamsi1103/flask-ocr-api/resolve/main/scratch_check_boxes.py
- Command line
-
hf download hf://spaces/vamsi1103/flask-ocr-api/scratch_check_boxes.py
-
curl -L -o scratch_check_boxes.py https://huggingface.co/spaces/vamsi1103/flask-ocr-api/resolve/main/scratch_check_boxes.py
455 Bytes
| import json | |
| import sys | |
| import io | |
| sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') | |
| with open("test_raw_comparison.json", "r", encoding="utf-8") as f: | |
| data = json.load(f) | |
| print("Default first 10:") | |
| for i, d in enumerate(data["default"][:10]): | |
| print(f" {i}: {d['text']:<25} box[0]: {d['box'][0]}") | |
| print("\nTelugu first 10:") | |
| for i, t in enumerate(data["telugu"][:10]): | |
| print(f" {i}: {t['text']:<25} box[0]: {t['box'][0]}") | |