etechoptimist commited on
Commit
30f02af
·
1 Parent(s): 4c9a24a

Correcting some issues

Browse files
Files changed (4) hide show
  1. .python-version +1 -1
  2. app.py +4 -1
  3. pyproject.toml +1 -1
  4. uv.lock +0 -0
.python-version CHANGED
@@ -1 +1 @@
1
- 3.13.1
 
1
+ 3.11
app.py CHANGED
@@ -25,10 +25,13 @@ def anomalies_detector(logs: str) -> list[tuple[int, str]]:
25
  model="microsoft/codebert-base", # Using CodeBERT which is better for technical text
26
  top_k=2 # Get both normal and anomalous probabilities
27
  )
28
-
 
29
  # Split logs into lines
30
  log_lines = logs.split('\n')
31
  anomalies = []
 
 
32
 
33
  # Process each line
34
  for line_num, line in enumerate(log_lines, 1):
 
25
  model="microsoft/codebert-base", # Using CodeBERT which is better for technical text
26
  top_k=2 # Get both normal and anomalous probabilities
27
  )
28
+ if logs == "":
29
+ return []
30
  # Split logs into lines
31
  log_lines = logs.split('\n')
32
  anomalies = []
33
+ if len(log_lines) == 0:
34
+ return []
35
 
36
  # Process each line
37
  for line_num, line in enumerate(log_lines, 1):
pyproject.toml CHANGED
@@ -3,7 +3,7 @@ name = "software_anomalies_detection"
3
  version = "0.1.0"
4
  description = "Add your description here"
5
  readme = "README.md"
6
- requires-python = ">=3.13"
7
  dependencies = [
8
  "gradio[mcp]>=5.33.0",
9
  "torch>=2.7.1",
 
3
  version = "0.1.0"
4
  description = "Add your description here"
5
  readme = "README.md"
6
+ requires-python = ">=3.11"
7
  dependencies = [
8
  "gradio[mcp]>=5.33.0",
9
  "torch>=2.7.1",
uv.lock CHANGED
The diff for this file is too large to render. See raw diff