Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -428,19 +428,17 @@ sample_RAG = {
|
|
| 428 |
col1, col2 = st.columns(2)
|
| 429 |
with col1:
|
| 430 |
st.title("Image Classification")
|
| 431 |
-
if not uploaded_image
|
| 432 |
placeholder = Image.open("dish-placeholder.jpg")
|
| 433 |
st.image(placeholder, caption="Placeholder Image.", use_container_width=True)
|
| 434 |
sample_class_names = ['Donuts', 'Onion Rings', 'Beignets', 'Churros', 'Cup Cakes']
|
| 435 |
sample_confidences = [98.1131911277771, 1.3879689387977123, 0.12678804341703653, 0.05296396557241678, 0.04436225863173604]
|
| 436 |
display_prediction_graph(sample_class_names, sample_confidences)
|
| 437 |
-
|
| 438 |
-
|
| 439 |
-
# Open the image
|
| 440 |
input_image = Image.open(uploaded_image)
|
| 441 |
-
|
| 442 |
-
# Display the image
|
| 443 |
st.image(input_image, caption="Uploaded Image.", use_container_width=True)
|
|
|
|
| 444 |
with col2:
|
| 445 |
st.title('RAG Recipe')
|
| 446 |
if not recipe_submit:
|
|
|
|
| 428 |
col1, col2 = st.columns(2)
|
| 429 |
with col1:
|
| 430 |
st.title("Image Classification")
|
| 431 |
+
if not uploaded_image:
|
| 432 |
placeholder = Image.open("dish-placeholder.jpg")
|
| 433 |
st.image(placeholder, caption="Placeholder Image.", use_container_width=True)
|
| 434 |
sample_class_names = ['Donuts', 'Onion Rings', 'Beignets', 'Churros', 'Cup Cakes']
|
| 435 |
sample_confidences = [98.1131911277771, 1.3879689387977123, 0.12678804341703653, 0.05296396557241678, 0.04436225863173604]
|
| 436 |
display_prediction_graph(sample_class_names, sample_confidences)
|
| 437 |
+
else:
|
| 438 |
+
# Open and display image
|
|
|
|
| 439 |
input_image = Image.open(uploaded_image)
|
|
|
|
|
|
|
| 440 |
st.image(input_image, caption="Uploaded Image.", use_container_width=True)
|
| 441 |
+
|
| 442 |
with col2:
|
| 443 |
st.title('RAG Recipe')
|
| 444 |
if not recipe_submit:
|