Circhastic commited on
Commit
ac03c7a
·
1 Parent(s): 98ba9be

Updated model

Browse files
Files changed (2) hide show
  1. app.py +3 -0
  2. crv3.keras +2 -2
app.py CHANGED
@@ -39,6 +39,9 @@ def classify_code(input_text, input_file):
39
  tokenized_code = tokenize_java_code(cleaned_code)
40
  prediction = model.predict(tokenized_code)[0][0]
41
 
 
 
 
42
  # Convert to readable/unreadable
43
  return "Readable" if prediction > 0.5 else "Unreadable"
44
 
 
39
  tokenized_code = tokenize_java_code(cleaned_code)
40
  prediction = model.predict(tokenized_code)[0][0]
41
 
42
+ threshold = 0.525 # Increase the threshold for "Readable"
43
+ prediction = (prediction > threshold).astype(int) # Convert probabilities to binary
44
+
45
  # Convert to readable/unreadable
46
  return "Readable" if prediction > 0.5 else "Unreadable"
47
 
crv3.keras CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:81c3f7e7710a64be868392a28d5a91f91aef0bdde24c43147ac99b09edba0cb4
3
- size 11959524
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da8d9f9c0924cdf329c5a6ef6ac51827944788a238e521fb44b06b87b7d48a8d
3
+ size 11959228