Commit
·
4c6b685
1
Parent(s):
bf17004
updated model threshold
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ 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 |
-
threshold = 0.
|
43 |
prediction = (prediction > threshold).astype(int) # Convert probabilities to binary
|
44 |
|
45 |
# Convert to readable/unreadable
|
|
|
39 |
tokenized_code = tokenize_java_code(cleaned_code)
|
40 |
prediction = model.predict(tokenized_code)[0][0]
|
41 |
|
42 |
+
threshold = 0.52 # Increase the threshold for "Readable"
|
43 |
prediction = (prediction > threshold).astype(int) # Convert probabilities to binary
|
44 |
|
45 |
# Convert to readable/unreadable
|