Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -30,12 +30,9 @@ if st.button("Predict"):
|
|
30 |
# Convert to numpy array if necessary
|
31 |
predicted_scores = predictions.numpy()
|
32 |
|
33 |
-
# Apply
|
34 |
-
|
35 |
-
|
36 |
-
reduction_amount = current_average_score - target_average_score
|
37 |
-
|
38 |
-
adjusted_scores = predicted_scores - reduction_amount
|
39 |
|
40 |
# Ensure scores do not go below zero
|
41 |
adjusted_scores = np.maximum(adjusted_scores, 0)
|
@@ -44,8 +41,8 @@ if st.button("Predict"):
|
|
44 |
normalized_scores = (adjusted_scores / adjusted_scores.max()) * 9 # Scale to 9
|
45 |
|
46 |
# Apply an additional reduction to the overall score if needed
|
|
|
47 |
overall_score_index = len(normalized_scores) - 1
|
48 |
-
additional_reduction = 2.0 # Adjust this value as needed
|
49 |
normalized_scores[overall_score_index] = max(normalized_scores[overall_score_index] - additional_reduction, 0)
|
50 |
|
51 |
# Round the scores
|
|
|
30 |
# Convert to numpy array if necessary
|
31 |
predicted_scores = predictions.numpy()
|
32 |
|
33 |
+
# Apply uniform reduction (e.g., reduce by a factor)
|
34 |
+
reduction_factor = 0.7 # Reduce scores by 30%
|
35 |
+
adjusted_scores = predicted_scores * reduction_factor
|
|
|
|
|
|
|
36 |
|
37 |
# Ensure scores do not go below zero
|
38 |
adjusted_scores = np.maximum(adjusted_scores, 0)
|
|
|
41 |
normalized_scores = (adjusted_scores / adjusted_scores.max()) * 9 # Scale to 9
|
42 |
|
43 |
# Apply an additional reduction to the overall score if needed
|
44 |
+
additional_reduction = 1.0 # Adjust this value as needed
|
45 |
overall_score_index = len(normalized_scores) - 1
|
|
|
46 |
normalized_scores[overall_score_index] = max(normalized_scores[overall_score_index] - additional_reduction, 0)
|
47 |
|
48 |
# Round the scores
|