Senasu commited on
Commit
dcf58ee
·
verified ·
1 Parent(s): dab4aaa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -90,14 +90,14 @@ if file is not None:
90
  # Plot the bar chart
91
  ax.bar(list(prob_dict.keys()), list(prob_dict.values()), color='#197339', edgecolor='black')
92
  ax.set_ylabel('Probability', fontsize=14)
93
- ax.set_title('Prediction Probabilities for Each Class', fontsize=16)
94
 
95
  # Rotate x-axis labels for better readability
96
- plt.xticks(rotation=90, ha='right', fontsize=10)
97
 
98
  # Annotate bars with percentage values
99
  for index, value in enumerate(prob_dict.values()):
100
- ax.text(index, value, f'{value * 100:.2f}%', va='bottom', ha='center', fontsize=10)
101
 
102
  # Remove background grid and spines
103
  ax.spines['top'].set_visible(False)
 
90
  # Plot the bar chart
91
  ax.bar(list(prob_dict.keys()), list(prob_dict.values()), color='#197339', edgecolor='black')
92
  ax.set_ylabel('Probability', fontsize=14)
93
+ ax.set_title('Prediction Probabilities for Each Class', fontsize=20)
94
 
95
  # Rotate x-axis labels for better readability
96
+ plt.xticks(rotation=90, ha='right', fontsize=15)
97
 
98
  # Annotate bars with percentage values
99
  for index, value in enumerate(prob_dict.values()):
100
+ ax.text(index, value, f'{value * 100:.0f}%', va='bottom', ha='center', fontsize=10)
101
 
102
  # Remove background grid and spines
103
  ax.spines['top'].set_visible(False)