DDingcheol commited on
Commit
e5aa863
โ€ข
1 Parent(s): ac55567

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -106,7 +106,16 @@ def sepia(input_img):
106
  }
107
  print(class_probabilities)
108
 
109
- return fig
 
 
 
 
 
 
 
 
 
110
 
111
  demo = gr.Interface(fn=sepia,
112
  inputs=gr.Image(shape=(400, 600)),
 
106
  }
107
  print(class_probabilities)
108
 
109
+ class_probabilities = {
110
+ labels_list[i]: probabilities[:, :, i].numpy() for i in range(len(labels_list))
111
+ }
112
+
113
+ # ๊ฐ ํด๋ž˜์Šค์˜ ํ™•๋ฅ ์„ ์ถœ๋ ฅ
114
+ for label, prob_map in class_probabilities.items():
115
+ print(f"{label} probabilities:")
116
+ print(prob_map)
117
+
118
+ return fig, str(class_probabilities)
119
 
120
  demo = gr.Interface(fn=sepia,
121
  inputs=gr.Image(shape=(400, 600)),