KevSun commited on
Commit
f4b6560
·
verified ·
1 Parent(s): 7f1709e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -36,8 +36,8 @@ if st.button("Predict"):
36
  #predictions_np = np.array(predictions)
37
 
38
  # Scale the predictions
39
- scaled_scores = 2.25 * predicted_scores - 1.25
40
- rounded_scores = [round(score * 2) / 2 for score in scaled_scores] # Round to nearest 0.5
41
 
42
  # Display the predictions
43
  labels = ["Task Achievement", "Coherence and Cohesion", "Vocabulary", "Grammar", "Overall"]
 
36
  #predictions_np = np.array(predictions)
37
 
38
  # Scale the predictions
39
+ normalized_scores = (predicted_scores / predicted_scores.max()) * 9 # Scale to 9
40
+ rounded_scores = np.round(normalized_scores * 2) / 2
41
 
42
  # Display the predictions
43
  labels = ["Task Achievement", "Coherence and Cohesion", "Vocabulary", "Grammar", "Overall"]