Commit
·
9882588
1
Parent(s):
3897c15
Update app.py
Browse files
app.py
CHANGED
|
@@ -141,7 +141,10 @@ def generate_ocr(Method,img):
|
|
| 141 |
writer.writerow(add_csv)
|
| 142 |
commit_url = repo.push_to_hub()
|
| 143 |
print(commit_url)
|
| 144 |
-
|
|
|
|
|
|
|
|
|
|
| 145 |
# with open(DATA_FILE, "a") as csvfile:
|
| 146 |
# writer = csv.Writer(csvfile)
|
| 147 |
# writer.writerow(add_csv)
|
|
|
|
| 141 |
writer.writerow(add_csv)
|
| 142 |
commit_url = repo.push_to_hub()
|
| 143 |
print(commit_url)
|
| 144 |
+
try:
|
| 145 |
+
dataset = load_dataset("pragnakalp/OCR-img-to-text", data_files= "ocr_data.csv", streaming=True)
|
| 146 |
+
except Exception as e:
|
| 147 |
+
print("error in loading data",e)
|
| 148 |
# with open(DATA_FILE, "a") as csvfile:
|
| 149 |
# writer = csv.Writer(csvfile)
|
| 150 |
# writer.writerow(add_csv)
|