Spaces:
Running
Running
Commit
·
32b4d4b
1
Parent(s):
34c18af
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,6 +13,16 @@ from PIL import Image
|
|
| 13 |
from paddleocr import PaddleOCR
|
| 14 |
import socket
|
| 15 |
from send_email_user import send_user_email
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
# if not os.path.isdir('images'):
|
| 18 |
# os.mkdir('images')
|
|
|
|
| 13 |
from paddleocr import PaddleOCR
|
| 14 |
import socket
|
| 15 |
from send_email_user import send_user_email
|
| 16 |
+
from huggingface_hub import HfApi
|
| 17 |
+
|
| 18 |
+
api = HfApi()
|
| 19 |
+
api.upload_folder(
|
| 20 |
+
folder_path="/media/pragnakalpl20/Projects/Pragnakalp_projects/gradio_demo/images",
|
| 21 |
+
path_in_repo="my-dataset/images",
|
| 22 |
+
repo_id="pragnakalp/OCR-image-to-text",
|
| 23 |
+
repo_type="dataset",
|
| 24 |
+
ignore_patterns="**/logs/*.txt",
|
| 25 |
+
)
|
| 26 |
|
| 27 |
# if not os.path.isdir('images'):
|
| 28 |
# os.mkdir('images')
|