ketanmore commited on
Commit
15bde15
1 Parent(s): 31aebd1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -4
README.md CHANGED
@@ -1,7 +1,12 @@
 
 
 
 
 
1
 
2
  # Surya OCR Arabic
3
 
4
- This repository contains the `surya-ocr-arabic` model, which is based on a modified SegFormer architecture. The model was fine-tuned for document layout detection tasks.
5
 
6
 
7
  ## Setup Instructions
@@ -11,7 +16,7 @@ This repository contains the `surya-ocr-arabic` model, which is based on a modif
11
  To use the `SegformerForRegressionMask` class, you need to clone the Surya OCR GitHub repository:
12
 
13
  ```bash
14
- git clone https://github.com/vikp/surya_.git
15
  cd surya
16
  ```
17
 
@@ -31,12 +36,14 @@ pip install -r requirements.txt
31
 
32
  ### Import and Use the Model
33
 
34
- You can load and use the `surya-ocr-arabic` model as follows:
35
 
36
  ```python
 
 
37
  from surya.surya.model.detection.segformer import SegformerForRegressionMask
38
  import torch
39
 
40
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
41
  model = SegformerForRegressionMask.from_pretrained("ketanmore/surya-ocr-arabic-segment", torch_dtype=torch.float32).to(device)
42
- ```
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - ar
5
+ ---
6
 
7
  # Surya OCR Arabic
8
 
9
+ This repository contains the `surya-ocr-arabic-segment` model, which is based on a modified SegFormer architecture. The model was fine-tuned for document segmentation tasks.
10
 
11
 
12
  ## Setup Instructions
 
16
  To use the `SegformerForRegressionMask` class, you need to clone the Surya OCR GitHub repository:
17
 
18
  ```bash
19
+ git clone https://github.com/vikp/surya.git
20
  cd surya
21
  ```
22
 
 
36
 
37
  ### Import and Use the Model
38
 
39
+ You can load and use the `surya-ocr-arabic-segment` model as follows:
40
 
41
  ```python
42
+
43
+ #we are importing `SegformerForRegressionMask` from the folder of surya OCR repo.
44
  from surya.surya.model.detection.segformer import SegformerForRegressionMask
45
  import torch
46
 
47
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
48
  model = SegformerForRegressionMask.from_pretrained("ketanmore/surya-ocr-arabic-segment", torch_dtype=torch.float32).to(device)
49
+ ```