Spaces:
Runtime error
Runtime error
File size: 725 Bytes
27f7305 9892899 adbb475 9892899 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
from huggingface_hub import HfApi, HfFolder
import os
def download_file(path, url):
api = HfApi()
folder = HfFolder()
token = folder.get_token()
api.download_file(url, path, token)
def setup():
if not os.path.exists("bird_info.csv"):
download_file("bird_info.csv", "https://huggingface.co/spaces/braedenb/demo_space/raw/main/bird_info.csv")
if not os.path.exists("class_indices_c271.json"):
download_file("class_indices_c271.json", "https://huggingface.co/spaces/braedenb/demo_space/raw/main/class_indices_c271.json")
if not os.path.exists("styles.css"):
download_file("styles.css", "https://huggingface.co/spaces/braedenb/demo_space/raw/main/styles.css")
|