Spaces:
Running
Running
feat: add logger
Browse files- src/pages/2_π_map.py +4 -3
- src/pages/4_π₯_classifiers.py +11 -6
src/pages/2_π_map.py
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
import streamlit as st
|
|
|
|
|
|
|
2 |
|
3 |
st.set_page_config(
|
4 |
page_title="About",
|
@@ -10,10 +13,8 @@ from maps.obs_map import add_obs_map_header
|
|
10 |
from maps.alps_map import present_alps_map
|
11 |
from maps.obs_map import present_obs_map
|
12 |
|
13 |
-
from datasets import disable_caching
|
14 |
-
disable_caching()
|
15 |
-
|
16 |
############################################################
|
|
|
17 |
USE_BASIC_MAP = False
|
18 |
DEV_SIDEBAR_LIB = True
|
19 |
############################################################
|
|
|
1 |
import streamlit as st
|
2 |
+
import logging
|
3 |
+
from datasets import disable_caching
|
4 |
+
disable_caching()
|
5 |
|
6 |
st.set_page_config(
|
7 |
page_title="About",
|
|
|
13 |
from maps.alps_map import present_alps_map
|
14 |
from maps.obs_map import present_obs_map
|
15 |
|
|
|
|
|
|
|
16 |
############################################################
|
17 |
+
g_logger = logging.getLogger(__name__)
|
18 |
USE_BASIC_MAP = False
|
19 |
DEV_SIDEBAR_LIB = True
|
20 |
############################################################
|
src/pages/4_π₯_classifiers.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
import os
|
3 |
import pandas as pd
|
|
|
4 |
|
5 |
st.set_page_config(
|
6 |
page_title="ML Models",
|
@@ -23,12 +24,6 @@ from hf_push_observations import push_all_observations
|
|
23 |
from classifier.classifier_image import cetacean_just_classify, cetacean_show_results_and_review, cetacean_show_results, init_classifier_session_states
|
24 |
from classifier.classifier_hotdog import hotdog_classify
|
25 |
|
26 |
-
# setup for the ML model on huggingface (our wrapper)
|
27 |
-
os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python"
|
28 |
-
# one toggle for all the extra debug text
|
29 |
-
if "MODE_DEV_STATEFUL" not in st.session_state:
|
30 |
-
st.session_state.MODE_DEV_STATEFUL = False
|
31 |
-
|
32 |
############################################################
|
33 |
classifier_name = "Saving-Willy/cetacean-classifier"
|
34 |
#classifier_revision = '0f9c15e2db4d64e7f622ade518854b488d8d35e6'
|
@@ -37,6 +32,16 @@ dataset_id = "Saving-Willy/temp_dataset"
|
|
37 |
data_files = "data/train-00000-of-00001.parquet"
|
38 |
############################################################
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
# Streamlit app
|
41 |
tab_inference, tab_hotdogs= \
|
42 |
st.tabs(["Cetecean classifier", "Hotdog classifier"])
|
|
|
1 |
import streamlit as st
|
2 |
import os
|
3 |
import pandas as pd
|
4 |
+
import logging
|
5 |
|
6 |
st.set_page_config(
|
7 |
page_title="ML Models",
|
|
|
24 |
from classifier.classifier_image import cetacean_just_classify, cetacean_show_results_and_review, cetacean_show_results, init_classifier_session_states
|
25 |
from classifier.classifier_hotdog import hotdog_classify
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
############################################################
|
28 |
classifier_name = "Saving-Willy/cetacean-classifier"
|
29 |
#classifier_revision = '0f9c15e2db4d64e7f622ade518854b488d8d35e6'
|
|
|
32 |
data_files = "data/train-00000-of-00001.parquet"
|
33 |
############################################################
|
34 |
|
35 |
+
g_logger = logging.getLogger(__name__)
|
36 |
+
# setup for the ML model on huggingface (our wrapper)
|
37 |
+
os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python"
|
38 |
+
# one toggle for all the extra debug text
|
39 |
+
if "MODE_DEV_STATEFUL" not in st.session_state:
|
40 |
+
st.session_state.MODE_DEV_STATEFUL = False
|
41 |
+
|
42 |
+
############################################################
|
43 |
+
|
44 |
+
|
45 |
# Streamlit app
|
46 |
tab_inference, tab_hotdogs= \
|
47 |
st.tabs(["Cetecean classifier", "Hotdog classifier"])
|