tomas-gajarsky commited on
Commit
77fb271
1 Parent(s): 5d19f3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import os
2
  import json
 
3
  import operator
4
  import gradio as gr
5
  import torchvision
@@ -9,8 +10,17 @@ from facetorch.datastruct import ImageData
9
  from omegaconf import OmegaConf
10
  from torch.nn.functional import cosine_similarity
11
 
 
 
 
 
 
 
 
 
 
12
 
13
- cfg = OmegaConf.load("config.merged.yml")
14
  analyzer = FaceAnalyzer(cfg.analyzer)
15
 
16
  def gen_sim_dict_str(response: ImageData, pred_name: str = "verify", index: int = 0)-> str:
 
1
  import os
2
  import json
3
+ import argparse
4
  import operator
5
  import gradio as gr
6
  import torchvision
 
10
  from omegaconf import OmegaConf
11
  from torch.nn.functional import cosine_similarity
12
 
13
+ parser = argparse.ArgumentParser(description="App")
14
+ parser.add_argument(
15
+ "--path-conf",
16
+ type=str,
17
+ default="config.merged.yml",
18
+ help="Path to the config file",
19
+ )
20
+
21
+ args = parser.parse_args()
22
 
23
+ cfg = OmegaConf.load(args.path_conf)
24
  analyzer = FaceAnalyzer(cfg.analyzer)
25
 
26
  def gen_sim_dict_str(response: ImageData, pred_name: str = "verify", index: int = 0)-> str: