Spaces:
Sleeping
Sleeping
umyuu
commited on
Commit
·
35e7d15
1
Parent(s):
23f64b3
関数内のログ出力レベルをdebugに変更します。
Browse files- app.py +4 -7
- config.json +1 -1
app.py
CHANGED
|
@@ -84,17 +84,17 @@ def submit_clicked(image: np.ndarray, algorithm: Literal["SpectralResidual", "Fi
|
|
| 84 |
log.info(f"#submit_clicked({sw.elapsed:.3f}s)")
|
| 85 |
#
|
| 86 |
saliency = SaliencyMap(algorithm)
|
| 87 |
-
log.
|
| 88 |
success, saliency_map = saliency.compute(image)
|
| 89 |
-
log.
|
| 90 |
|
| 91 |
if not success:
|
| 92 |
return image, image # エラーが発生した場合は入力画像を返します。
|
| 93 |
|
| 94 |
-
log.
|
| 95 |
jet = convert_colormap(image, saliency_map, "jet")
|
| 96 |
# jet = None
|
| 97 |
-
log.
|
| 98 |
hot = convert_colormap(image, saliency_map, "hot")
|
| 99 |
saliency = None
|
| 100 |
log.info(f"#submit_clicked({sw.elapsed:.3f}s)")
|
|
@@ -166,7 +166,6 @@ with gr.Blocks(
|
|
| 166 |
|
| 167 |
|
| 168 |
if __name__ == "__main__":
|
| 169 |
-
log.info(f"#launch({watch.elapsed:.3f}s)")
|
| 170 |
# アプリを起動します。
|
| 171 |
# https://www.gradio.app/docs/gradio/blocks#blocks-launch
|
| 172 |
demo.launch(
|
|
@@ -175,5 +174,3 @@ if __name__ == "__main__":
|
|
| 175 |
server_port=args.server_port,
|
| 176 |
max_file_size=args.max_file_size,
|
| 177 |
)
|
| 178 |
-
|
| 179 |
-
log.info(f"#Hot Reload完了({watch.elapsed:.3f}s)")
|
|
|
|
| 84 |
log.info(f"#submit_clicked({sw.elapsed:.3f}s)")
|
| 85 |
#
|
| 86 |
saliency = SaliencyMap(algorithm)
|
| 87 |
+
log.debug(f"#SaliencyMap({sw.elapsed:.3f}s)")
|
| 88 |
success, saliency_map = saliency.compute(image)
|
| 89 |
+
log.debug(f"#compute({sw.elapsed:.3f}s)")
|
| 90 |
|
| 91 |
if not success:
|
| 92 |
return image, image # エラーが発生した場合は入力画像を返します。
|
| 93 |
|
| 94 |
+
log.debug(f"#jet({sw.elapsed:.3f}s)")
|
| 95 |
jet = convert_colormap(image, saliency_map, "jet")
|
| 96 |
# jet = None
|
| 97 |
+
log.debug(f"#hot({sw.elapsed:.3f}s)")
|
| 98 |
hot = convert_colormap(image, saliency_map, "hot")
|
| 99 |
saliency = None
|
| 100 |
log.info(f"#submit_clicked({sw.elapsed:.3f}s)")
|
|
|
|
| 166 |
|
| 167 |
|
| 168 |
if __name__ == "__main__":
|
|
|
|
| 169 |
# アプリを起動します。
|
| 170 |
# https://www.gradio.app/docs/gradio/blocks#blocks-launch
|
| 171 |
demo.launch(
|
|
|
|
| 174 |
server_port=args.server_port,
|
| 175 |
max_file_size=args.max_file_size,
|
| 176 |
)
|
|
|
|
|
|
config.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
| 26 |
"handlers": {
|
| 27 |
"console1": {
|
| 28 |
"class": "logging.StreamHandler",
|
| 29 |
-
"level": "
|
| 30 |
"formatter": "jst"
|
| 31 |
}
|
| 32 |
},
|
|
|
|
| 26 |
"handlers": {
|
| 27 |
"console1": {
|
| 28 |
"class": "logging.StreamHandler",
|
| 29 |
+
"level": "INFO",
|
| 30 |
"formatter": "jst"
|
| 31 |
}
|
| 32 |
},
|