yourusername commited on
Commit
1d39d61
·
1 Parent(s): fb7e2da

:loud_sound: update logs

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -1,9 +1,20 @@
1
  import os
 
 
2
 
3
  import streamlit as st
4
  from huggingface_hub import Repository
5
 
6
 
 
 
 
 
 
 
 
 
 
7
  st.title("Spaces LFS Workflow")
8
 
9
  if os.environ.get("DO_DOWNLOAD_CACHE") and 'cache_is_downloaded' not in st.session_state:
@@ -12,3 +23,4 @@ if os.environ.get("DO_DOWNLOAD_CACHE") and 'cache_is_downloaded' not in st.sessi
12
 
13
  st.write(os.listdir('.'))
14
  st.write(os.listdir('./cache_dir'))
 
 
1
  import os
2
+ import sys
3
+ from subprocess import call
4
 
5
  import streamlit as st
6
  from huggingface_hub import Repository
7
 
8
 
9
+ def run_cmd(command):
10
+ try:
11
+ print(command)
12
+ call(command, shell=True)
13
+ except KeyboardInterrupt:
14
+ print("Process interrupted")
15
+ sys.exit(1)
16
+
17
+
18
  st.title("Spaces LFS Workflow")
19
 
20
  if os.environ.get("DO_DOWNLOAD_CACHE") and 'cache_is_downloaded' not in st.session_state:
 
23
 
24
  st.write(os.listdir('.'))
25
  st.write(os.listdir('./cache_dir'))
26
+ run_cmd('ls -lash cache_dir/')