GotThatData commited on
Commit
3736c3f
·
verified ·
1 Parent(s): e2cfe8a
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -8,7 +8,8 @@ from PIL import Image
8
  from tqdm import tqdm
9
  import logging
10
  import yaml
11
- from huggingface_hub import login # Add this import
 
12
 
13
  # Authenticate with Hugging Face
14
  HF_TOKEN = os.getenv('HF_TOKEN')
@@ -66,30 +67,23 @@ def initialize_dataset():
66
  try:
67
  # Check if the README.md exists, if not create it
68
  readme_content = """# Sports Cards Dataset
69
-
70
  This dataset contains sports card images with structured metadata. Each image is named using a consistent convention and includes relevant information about the card.
71
-
72
  ## Dataset Structure
73
-
74
  ```
75
  sports_card_{number}.jpg - Card images
76
  ```
77
-
78
  ## Features
79
  - file_path: Path to the image file
80
  - original_name: Original filename of the card
81
  - new_name: Standardized filename
82
  - image: Image data
83
-
84
  ## Usage
85
  ```python
86
  from datasets import load_dataset
87
  dataset = load_dataset("GotThatData/sports-cards")
88
  ```
89
-
90
  ## License
91
  This dataset is licensed under MIT.
92
-
93
  ## Creator
94
  Created by GotThatData
95
  """
 
8
  from tqdm import tqdm
9
  import logging
10
  import yaml
11
+ from huggingface_hub import login
12
+ import json # Add this import
13
 
14
  # Authenticate with Hugging Face
15
  HF_TOKEN = os.getenv('HF_TOKEN')
 
67
  try:
68
  # Check if the README.md exists, if not create it
69
  readme_content = """# Sports Cards Dataset
 
70
  This dataset contains sports card images with structured metadata. Each image is named using a consistent convention and includes relevant information about the card.
 
71
  ## Dataset Structure
 
72
  ```
73
  sports_card_{number}.jpg - Card images
74
  ```
 
75
  ## Features
76
  - file_path: Path to the image file
77
  - original_name: Original filename of the card
78
  - new_name: Standardized filename
79
  - image: Image data
 
80
  ## Usage
81
  ```python
82
  from datasets import load_dataset
83
  dataset = load_dataset("GotThatData/sports-cards")
84
  ```
 
85
  ## License
86
  This dataset is licensed under MIT.
 
87
  ## Creator
88
  Created by GotThatData
89
  """