Kaelan commited on
Commit
e972274
·
1 Parent(s): 7723a19

add config

Browse files
Files changed (2) hide show
  1. .streamlit/config.toml +6 -0
  2. app.py +5 -2
.streamlit/config.toml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ [theme] # You have to add this line
2
+
3
+
4
+ backgroundColor = '#000000' # Black
5
+
6
+
app.py CHANGED
@@ -14,10 +14,13 @@ from src.trainers import eval_spacy
14
  with open('./st_config.yaml', "r") as yamlfile:
15
  args = yaml.load(yamlfile, Loader=yaml.FullLoader)
16
 
17
- if os.path.exists(args['model_dir']):
 
 
18
  model_names_dir = os.listdir(args['model_dir'])
19
  else:
20
- model_names_dir = []
 
21
 
22
  model_names = model_names_dir + args['default_models'] if args['default_models'] is not None else model_names_dir
23
 
 
14
  with open('./st_config.yaml', "r") as yamlfile:
15
  args = yaml.load(yamlfile, Loader=yaml.FullLoader)
16
 
17
+ if args['model_dir'] is None:
18
+ model_names_dir = []
19
+ elif os.path.exists(args['model_dir']):
20
  model_names_dir = os.listdir(args['model_dir'])
21
  else:
22
+ model_names_dir = []
23
+
24
 
25
  model_names = model_names_dir + args['default_models'] if args['default_models'] is not None else model_names_dir
26