Spaces:
Runtime error
Runtime error
File size: 654 Bytes
50a1cad 1d39d61 50a1cad 1d39d61 50a1cad fb7e2da 1d39d61 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import os
import sys
from subprocess import call
import streamlit as st
from huggingface_hub import Repository
def run_cmd(command):
try:
print(command)
call(command, shell=True)
except KeyboardInterrupt:
print("Process interrupted")
sys.exit(1)
st.title("Spaces LFS Workflow")
if os.environ.get("DO_DOWNLOAD_CACHE") and 'cache_is_downloaded' not in st.session_state:
with st.spinner("Downloading cache..."):
repo = Repository(local_dir="cache_dir", clone_from='nateraw/fairface', repo_type='dataset')
st.write(os.listdir('.'))
st.write(os.listdir('./cache_dir'))
run_cmd('ls -lash cache_dir/')
|