seonglae-holistic commited on
Commit
ca72b36
·
1 Parent(s): 124bec5

fix: lint with corrected row type icon

Browse files
src/about.py CHANGED
@@ -41,7 +41,7 @@ Lower scores indicate fewer vulnerabilities and lower risk. The Trust Score is a
41
  """
42
 
43
  # Which evaluations are you running? how can people reproduce what you have?
44
- LLM_BENCHMARKS_TEXT = f"""
45
  ## How LibVulnWatch Works
46
 
47
  Our assessment methodology evaluates libraries through:
 
41
  """
42
 
43
  # Which evaluations are you running? how can people reproduce what you have?
44
+ LLM_BENCHMARKS_TEXT = """
45
  ## How LibVulnWatch Works
46
 
47
  Our assessment methodology evaluates libraries through:
src/display/formatting.py CHANGED
@@ -1,8 +1,5 @@
1
  """Helper functions to style our gradio elements"""
2
 
3
- import re
4
- import os
5
-
6
  def model_hyperlink(link, model_name):
7
  return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>'
8
 
@@ -13,21 +10,23 @@ def make_clickable_model(model_name):
13
 
14
 
15
  def make_clickable_report(report_url):
16
- """Return the direct URL to the assessment report without any formatting"""
17
- # Just return the URL string directly
18
- return report_url
19
 
20
 
21
  def styled_error(error):
22
- return f"<p style='color: red; font-size: 20px; text-align: center;'>{error}</p>"
 
23
 
24
 
25
  def styled_warning(warn):
26
- return f"<p style='color: orange; font-size: 20px; text-align: center;'>{warn}</p>"
 
27
 
28
 
29
  def styled_message(message):
30
- return f"<p style='color: green; font-size: 20px; text-align: center;'>{message}</p>"
 
31
 
32
 
33
  def has_no_nan_values(df, columns):
@@ -48,21 +47,6 @@ def make_clickable_library(library_name: str) -> str:
48
  return f'<a href="{github_url}" target="_blank">{library_name}</a>'
49
 
50
 
51
- def styled_message(message) -> str:
52
- """Format a message with a green header"""
53
- return f'<span style="color: green">✅ Success:</span> {message}'
54
-
55
-
56
- def styled_warning(message) -> str:
57
- """Format a warning message with an orange header"""
58
- return f'<span style="color: orange">⚠️ Warning:</span> {message}'
59
-
60
-
61
- def styled_error(message) -> str:
62
- """Format an error message with a red header"""
63
- return f'<span style="color: red">❌ Error:</span> {message}'
64
-
65
-
66
  # Risk severity coloring for risk scores
67
  def colorize_risk_score(score):
68
  """
 
1
  """Helper functions to style our gradio elements"""
2
 
 
 
 
3
  def model_hyperlink(link, model_name):
4
  return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>'
5
 
 
10
 
11
 
12
  def make_clickable_report(report_url):
13
+ """Create a clickable HTML link for assessment reports"""
14
+ return f'<a href="{report_url}" target="_blank">View Report</a>'
 
15
 
16
 
17
  def styled_error(error):
18
+ """Format an error message with a red header"""
19
+ return f'<span style="color: red">❌ Error:</span> {error}'
20
 
21
 
22
  def styled_warning(warn):
23
+ """Format a warning message with an orange header"""
24
+ return f'<span style="color: orange">⚠️ Warning:</span> {warn}'
25
 
26
 
27
  def styled_message(message):
28
+ """Format a message with a green header"""
29
+ return f'<span style="color: green">✅ Success:</span> {message}'
30
 
31
 
32
  def has_no_nan_values(df, columns):
 
47
  return f'<a href="{github_url}" target="_blank">{library_name}</a>'
48
 
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  # Risk severity coloring for risk scores
51
  def colorize_risk_score(score):
52
  """
src/submission/submit.py CHANGED
@@ -1,19 +1,13 @@
1
  import json
2
  import os
3
- import re
4
- import time
5
  import uuid
6
  from datetime import datetime
7
  from pathlib import Path
8
 
9
- import huggingface_hub
10
- import requests
11
- from huggingface_hub import HfApi
12
-
13
- from src.display.utils import LibraryType, Language, AssessmentStatus
14
  from src.display.formatting import styled_error, styled_warning, styled_message
15
- from src.envs import API, EVAL_REQUESTS_PATH, QUEUE_REPO, TOKEN, LOCAL_MODE
16
- from src.submission.check_validity import is_repository_valid, get_library_info
17
 
18
 
19
  def add_new_eval(
 
1
  import json
2
  import os
 
 
3
  import uuid
4
  from datetime import datetime
5
  from pathlib import Path
6
 
7
+ from src.display.utils import LibraryType
 
 
 
 
8
  from src.display.formatting import styled_error, styled_warning, styled_message
9
+ from src.envs import API, EVAL_REQUESTS_PATH, QUEUE_REPO, LOCAL_MODE
10
+ from src.submission.check_validity import is_repository_valid
11
 
12
 
13
  def add_new_eval(