Datasets:
Reetu Raj Harsh
commited on
Upload Text2SQL dataset with 34 SQLite databases and metadata files
Browse files
README.md
CHANGED
|
@@ -189,7 +189,7 @@ import sqlite3
|
|
| 189 |
import yaml
|
| 190 |
|
| 191 |
# Load the main dataset using HuggingFace datasets library
|
| 192 |
-
dataset = load_dataset("domyn/
|
| 193 |
print(f"Dataset: {dataset}")
|
| 194 |
print(f"Number of examples: {len(dataset['train'])}")
|
| 195 |
|
|
@@ -201,13 +201,13 @@ print(f"Database: {sample['db_id']}")
|
|
| 201 |
print(f"Difficulty: {sample['difficulty']}")
|
| 202 |
|
| 203 |
# Load schema information for the database
|
| 204 |
-
schema_path = hf_hub_download(repo_id="domyn/
|
| 205 |
with open(schema_path, 'r') as f:
|
| 206 |
schemas = yaml.safe_load(f)
|
| 207 |
|
| 208 |
# Download the corresponding SQLite database
|
| 209 |
db_path = hf_hub_download(
|
| 210 |
-
repo_id="domyn/
|
| 211 |
filename=f"text2sql-db/text2sql/bird/{sample['db_id']}.sqlite"
|
| 212 |
)
|
| 213 |
|
|
@@ -227,7 +227,7 @@ import sqlite3
|
|
| 227 |
from huggingface_hub import hf_hub_download
|
| 228 |
|
| 229 |
# Alternative: Load dataset JSON file directly
|
| 230 |
-
samples_path = hf_hub_download(repo_id="domyn/
|
| 231 |
with open(samples_path, 'r') as f:
|
| 232 |
dataset = json.load(f)
|
| 233 |
|
|
|
|
| 189 |
import yaml
|
| 190 |
|
| 191 |
# Load the main dataset using HuggingFace datasets library
|
| 192 |
+
dataset = load_dataset("domyn/FINCH")
|
| 193 |
print(f"Dataset: {dataset}")
|
| 194 |
print(f"Number of examples: {len(dataset['train'])}")
|
| 195 |
|
|
|
|
| 201 |
print(f"Difficulty: {sample['difficulty']}")
|
| 202 |
|
| 203 |
# Load schema information for the database
|
| 204 |
+
schema_path = hf_hub_download(repo_id="domyn/FINCH", filename="schemas/database_schemas.yaml")
|
| 205 |
with open(schema_path, 'r') as f:
|
| 206 |
schemas = yaml.safe_load(f)
|
| 207 |
|
| 208 |
# Download the corresponding SQLite database
|
| 209 |
db_path = hf_hub_download(
|
| 210 |
+
repo_id="domyn/FINCH",
|
| 211 |
filename=f"text2sql-db/text2sql/bird/{sample['db_id']}.sqlite"
|
| 212 |
)
|
| 213 |
|
|
|
|
| 227 |
from huggingface_hub import hf_hub_download
|
| 228 |
|
| 229 |
# Alternative: Load dataset JSON file directly
|
| 230 |
+
samples_path = hf_hub_download(repo_id="domyn/FINCH", filename="finch_dataset.json")
|
| 231 |
with open(samples_path, 'r') as f:
|
| 232 |
dataset = json.load(f)
|
| 233 |
|