Ryu-m0m commited on
Commit
7b203a5
1 Parent(s): 705cef1

Add image_viewer

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -7,6 +7,7 @@ import pathlib
7
 
8
  header = st.container()
9
  inference = st.container()
 
10
 
11
  with header:
12
  st.title("Cuisine Classifier")
@@ -33,4 +34,8 @@ with inference:
33
  pred, pred_idx, probs = learn_inf.predict(img)
34
  prob_value = probs[pred_idx].item()
35
  rounded_prob_percentage = round(prob_value * 100)
36
- st.text(f"This is {pred}, isn't it? Believe me, I am {rounded_prob_percentage}% sure!")
 
 
 
 
 
7
 
8
  header = st.container()
9
  inference = st.container()
10
+ image_viewer = st.container()
11
 
12
  with header:
13
  st.title("Cuisine Classifier")
 
34
  pred, pred_idx, probs = learn_inf.predict(img)
35
  prob_value = probs[pred_idx].item()
36
  rounded_prob_percentage = round(prob_value * 100)
37
+ st.text(f"This is {pred}, isn't it? Believe me, I am {rounded_prob_percentage}% sure!")
38
+
39
+ with image_viewer:
40
+ st.header(f"Your food pic")
41
+ st.image(image=img, caption='your pic will be shown here')