Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -319,7 +319,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')
|
| 323 |
|
| 324 |
st.pyplot(fig) # Display the plot
|
| 325 |
|
|
@@ -433,8 +433,9 @@ with col1:
|
|
| 433 |
if not uploaded_image and not recipe_submit:
|
| 434 |
placeholder = Image.open("dish-placeholder.jpg")
|
| 435 |
st.image(placeholder, caption="Placeholder Image.", use_container_width=True)
|
| 436 |
-
|
| 437 |
-
|
|
|
|
| 438 |
|
| 439 |
if uploaded_image:
|
| 440 |
# Open the image
|
|
|
|
| 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.05)
|
| 323 |
|
| 324 |
st.pyplot(fig) # Display the plot
|
| 325 |
|
|
|
|
| 433 |
if not uploaded_image and not recipe_submit:
|
| 434 |
placeholder = Image.open("dish-placeholder.jpg")
|
| 435 |
st.image(placeholder, caption="Placeholder Image.", use_container_width=True)
|
| 436 |
+
sample_class_names = ['Donuts', 'Onion Rings', 'Beignets', 'Churros', 'Cup Cakes']
|
| 437 |
+
sample_confidences [98.1131911277771, 1.3879689387977123, 0.12678804341703653, 0.05296396557241678, 0.04436225863173604]
|
| 438 |
+
display_prediction_graph(sample_class_names, sample_confidences)
|
| 439 |
|
| 440 |
if uploaded_image:
|
| 441 |
# Open the image
|