tonyliu404 commited on
Commit
75e68c3
·
verified ·
1 Parent(s): 5fdd8cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -281,8 +281,6 @@ def display_dishes_in_grid(dishes, cols=3):
281
  st.sidebar.write(dish.replace("_", " ").capitalize())
282
 
283
  def display_prediction_graph(class_names, confidences):
284
- print("CLASS NAMES: ", class_names)
285
- print("CONFIDENCES", confidences)
286
  #reversing them so graph displays highest predictions at the top
287
  confidences.reverse()
288
  class_names.reverse()
@@ -319,7 +317,7 @@ def display_prediction_graph(class_names, confidences):
319
  for spine in ax.spines.values():
320
  spine.set_visible(False)
321
 
322
- ax.set_title(class_names[-1], color='white', fontsize=24, fontweight='bold', ha='left', x=0.7)
323
 
324
  st.pyplot(fig) # Display the plot
325
 
@@ -541,9 +539,9 @@ if recipe_submit and uploaded_image:
541
  # st.markdown(f"*{class_name}*: {confidence:.2f}%")
542
  # print(fpredictions)
543
 
544
- # elif recipe_submit:
545
- # with col2:
546
- # response = get_response(query)
547
- # print(response)
548
- # display_response(response)
549
 
 
281
  st.sidebar.write(dish.replace("_", " ").capitalize())
282
 
283
  def display_prediction_graph(class_names, confidences):
 
 
284
  #reversing them so graph displays highest predictions at the top
285
  confidences.reverse()
286
  class_names.reverse()
 
317
  for spine in ax.spines.values():
318
  spine.set_visible(False)
319
 
320
+ ax.set_title(class_names[-1], color='white', fontsize=24, fontweight='bold', ha='left', x=0.5)
321
 
322
  st.pyplot(fig) # Display the plot
323
 
 
539
  # st.markdown(f"*{class_name}*: {confidence:.2f}%")
540
  # print(fpredictions)
541
 
542
+ elif recipe_submit:
543
+ with col2:
544
+ response = get_response(query)
545
+ print(response)
546
+ display_response(response)
547