DmitryRyumin commited on
Commit
599fb2e
Β·
1 Parent(s): cde16b5
Files changed (2) hide show
  1. app/requirements_app.py +17 -14
  2. config.toml +1 -1
app/requirements_app.py CHANGED
@@ -17,20 +17,23 @@ def read_requirements(file_path="requirements.txt"):
17
 
18
  data = []
19
 
20
- pypi = (
21
- lambda x: f"<a href='https://pypi.org/project/{x}' target='_blank'>"
22
- + f"<img src='https://img.shields.io/pypi/v/{x}' alt='PyPI' /></a>"
23
- )
24
-
25
- data = [
26
- {
27
- config_data.Requirements_LIBRARY: split_line[0],
28
- config_data.Requirements_RECOMMENDED_VERSION: split_line[1],
29
- config_data.Requirements_CURRENT_VERSION: pypi(split_line[0]),
30
- }
31
- for line in lines
32
- if (split_line := line.strip().split("==")) and len(split_line) == 2
33
- ]
 
 
 
34
 
35
  df = pl.DataFrame(data)
36
 
 
17
 
18
  data = []
19
 
20
+ def pypi(x: str) -> str:
21
+ return (
22
+ f"<a href='https://pypi.org/project/{x}' target='_blank'>"
23
+ f"<img src='https://img.shields.io/pypi/v/{x}' alt='PyPI' /></a>"
24
+ )
25
+
26
+ for line in lines:
27
+ split_line = line.strip().split("==")
28
+ if len(split_line) == 2:
29
+ library, recommended_version = split_line
30
+ data.append(
31
+ {
32
+ config_data.Requirements_LIBRARY: library,
33
+ config_data.Requirements_RECOMMENDED_VERSION: recommended_version,
34
+ config_data.Requirements_CURRENT_VERSION: pypi(library),
35
+ }
36
+ )
37
 
38
  df = pl.DataFrame(data)
39
 
config.toml CHANGED
@@ -31,7 +31,7 @@ NOTI_RESULTS = [
31
  ]
32
  REC_TEXT = "Recognized text"
33
  VIDEO_DURATION = "Video duration"
34
- INFERENCE_TIME = "Inference time"
35
 
36
  [OtherMessages]
37
  CLEAR = "Clear"
 
31
  ]
32
  REC_TEXT = "Recognized text"
33
  VIDEO_DURATION = "Video duration"
34
+ INFERENCE_TIME = "MASAI pipeline inference time"
35
 
36
  [OtherMessages]
37
  CLEAR = "Clear"