Circhastic commited on
Commit
554bf8d
·
1 Parent(s): 2903d7e

adjusted threshold

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -69,7 +69,7 @@ def classify_code(input_text, input_file):
69
  tokenized_code = tokenize_java_code(code)
70
  prediction = model.predict(tokenized_code)[0][0]
71
 
72
- threshold = 0.52 # Adjust threshold for classification
73
  prediction = (prediction > threshold).astype(int) # Convert probability to binary
74
 
75
  return "Readable" if prediction == 1 else "Unreadable"
 
69
  tokenized_code = tokenize_java_code(code)
70
  prediction = model.predict(tokenized_code)[0][0]
71
 
72
+ threshold = 0.49 # Adjust threshold for classification
73
  prediction = (prediction > threshold).astype(int) # Convert probability to binary
74
 
75
  return "Readable" if prediction == 1 else "Unreadable"