Spaces:
Runtime error
Runtime error
File size: 489 Bytes
756e034 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
from huggingface_hub import hf_hub_download
import duckdb
import os
HF_REPO_ID = "stcoats/temp-duckdb-upload"
HF_FILENAME = "ycsep.duckdb"
LOCAL_PATH = "./ycsep.duckdb"
def get_connection():
if not os.path.exists(LOCAL_PATH):
hf_hub_download(
repo_id=HF_REPO_ID,
repo_type="dataset",
filename=HF_FILENAME,
local_dir=".",
local_dir_use_symlinks=False
)
return duckdb.connect(LOCAL_PATH, read_only=True)
|