tonyliu404 commited on
Commit
7d50af2
·
verified ·
1 Parent(s): eef3a21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -293,7 +293,7 @@ def display_dishes_in_grid(dishes, cols=3):
293
 
294
  def display_prediction_graph(class_names, confidences):
295
  # Create a list of labels and values from the predictions dictionary
296
- values = [round(value, 2) for value in confidences]
297
 
298
  # Determine the top prediction
299
  class_names.reverse()
@@ -307,7 +307,7 @@ def display_prediction_graph(class_names, confidences):
307
  orientation='h',
308
  marker=dict(color='orange'),
309
  text=values, # Display values on the bars
310
- textposition='outside' # Position the text outside the bars
311
  ))
312
 
313
  # Update layout for better appearance
 
293
 
294
  def display_prediction_graph(class_names, confidences):
295
  # Create a list of labels and values from the predictions dictionary
296
+ values = [round(value, 1) + "%" for value in confidences]
297
 
298
  # Determine the top prediction
299
  class_names.reverse()
 
307
  orientation='h',
308
  marker=dict(color='orange'),
309
  text=values, # Display values on the bars
310
+ textposition='inside' # Position the text inside the bars
311
  ))
312
 
313
  # Update layout for better appearance