Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,8 +36,8 @@ if st.button("Predict"):
|
|
| 36 |
#predictions_np = np.array(predictions)
|
| 37 |
|
| 38 |
# Scale the predictions
|
| 39 |
-
|
| 40 |
-
rounded_scores =
|
| 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"]
|