Agmiyas commited on
Commit
a61f395
1 Parent(s): 487f627

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -3
README.md CHANGED
@@ -39,19 +39,24 @@ pip install ultralytics
39
 
40
  ### How to use
41
 
42
- You can do the predictions with the following code snippet:
43
  ```
44
  import ultralytics
 
45
  from huggingface_hub import hf_hub_download
46
 
47
- # Loading the weights from our repository
48
  model_path = hf_hub_download(local_dir=".",
49
  repo_id="armvectores/yolov5_handwritten_text_detection",
50
  filename="best.pt")
51
  model = YOLO(model_path)
52
 
 
 
 
 
53
  # Do the predictions
54
- model.predict(source="path_to_your_image", save=True, show=True, show_labels=False, show_conf=False, conf=0.3)
55
  ```
56
 
57
 
 
39
 
40
  ### How to use
41
 
42
+ You can detect handwritten text with the following code snippet:
43
  ```
44
  import ultralytics
45
+ from ultralytics import YOLO
46
  from huggingface_hub import hf_hub_download
47
 
48
+ # Load the weights from our repository
49
  model_path = hf_hub_download(local_dir=".",
50
  repo_id="armvectores/yolov5_handwritten_text_detection",
51
  filename="best.pt")
52
  model = YOLO(model_path)
53
 
54
+ # Load test blank
55
+ test_blank_path = hf_hub_download(local_dir=".",
56
+ repo_id="armvectores/yolov5_handwritten_text_detection",
57
+ filename="test_blank.png")
58
  # Do the predictions
59
+ model.predict(source=test_blank, save=True, show=True, show_labels=False, show_conf=False, conf=0.3)
60
  ```
61
 
62