santh-cpu commited on
Commit
e93f7f1
·
verified ·
1 Parent(s): b8a9f6a

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +1 -1
model.py CHANGED
@@ -183,7 +183,7 @@ detector.load_state_dict(torch.load(weights_path, map_location=DEVICE))
183
  detector.eval()
184
 
185
  def predict(code: str, threshold: float = THRESHOLD) -> dict:
186
- if len(code.strip()) < 200:
187
  return {"pred": "too short", "prob": None}
188
 
189
  with torch.no_grad():
 
183
  detector.eval()
184
 
185
  def predict(code: str, threshold: float = THRESHOLD) -> dict:
186
+ if len(code.strip()) < 120:
187
  return {"pred": "too short", "prob": None}
188
 
189
  with torch.no_grad():