pragnakalp commited on
Commit
4f78dfa
1 Parent(s): 6c7ba9b

Update save_data.py

Browse files
Files changed (1) hide show
  1. save_data.py +5 -1
save_data.py CHANGED
@@ -1,4 +1,5 @@
1
  import os
 
2
  import json
3
  import shutil
4
  import requests
@@ -6,11 +7,14 @@ import re as r
6
  from urllib.request import urlopen
7
  from datetime import datetime
8
  from datasets import Image
 
9
  from huggingface_hub import Repository, upload_file
10
 
11
  HF_TOKEN = os.environ.get("HF_TOKEN")
12
  DATASET_NAME = "OCR-img-to-text"
13
- DATASET_REPO_URL = f"https://huggingface.co/datasets/pragnakalp/{DATASET_NAME}"
 
 
14
  DATASET_REPO_ID = "pragnakalp/OCR-img-to-text"
15
  print("is none?", HF_TOKEN is None)
16
  REPOSITORY_DIR = "data"
 
1
  import os
2
+ import numpy as np
3
  import json
4
  import shutil
5
  import requests
 
7
  from urllib.request import urlopen
8
  from datetime import datetime
9
  from datasets import Image
10
+ from PIL import Image
11
  from huggingface_hub import Repository, upload_file
12
 
13
  HF_TOKEN = os.environ.get("HF_TOKEN")
14
  DATASET_NAME = "OCR-img-to-text"
15
+ DATASET_REPO_URL = "https://huggingface.co/datasets/pragnakalp/OCR-img-to-text"
16
+ DATA_FILENAME = "ocr_data.csv"
17
+ DATA_FILE = os.path.join("ocr_data", DATA_FILENAME)
18
  DATASET_REPO_ID = "pragnakalp/OCR-img-to-text"
19
  print("is none?", HF_TOKEN is None)
20
  REPOSITORY_DIR = "data"