daniel-saed commited on
Commit
7a79475
·
verified ·
1 Parent(s): cfc8be1

Update navigation/soon.py

Browse files
Files changed (1) hide show
  1. navigation/soon.py +20 -0
navigation/soon.py CHANGED
@@ -8,6 +8,18 @@ from utils.ui_components import (
8
  )
9
  from utils.helper import client
10
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  col1, col2,col3 = st.columns([1,3,1])
13
 
@@ -47,6 +59,14 @@ with col2:
47
 
48
  if doc and doc["data"]:
49
  df = pd.DataFrame(doc["data"])
 
 
 
 
 
 
 
 
50
  #st.line_chart(df,x="time", y="steering_angle")
51
  #st.dataframe(df)
52
 
 
8
  )
9
  from utils.helper import client
10
 
11
+ if 'BASE_DIR' not in st.session_state:
12
+ from utils.helper import BASE_DIR,metrics_collection
13
+ st.session_state.BASE_DIR = BASE_DIR
14
+ #print("BASE_DIR", BASE_DIR)
15
+
16
+ if 'metrics_collection' not in st.session_state:
17
+ from utils.helper import BASE_DIR,metrics_collection
18
+ st.session_state.metrics_collection = metrics_collection
19
+ #print("metrics_collection", metrics_collection)
20
+
21
+ BASE_DIR = st.session_state.BASE_DIR
22
+ metrics_collection = st.session_state.metrics_collection
23
 
24
  col1, col2,col3 = st.columns([1,3,1])
25
 
 
59
 
60
  if doc and doc["data"]:
61
  df = pd.DataFrame(doc["data"])
62
+
63
+ try:
64
+ metrics_collection.update_one(
65
+ {"action": "descargar_archivo_db"},
66
+ {"$inc": {"count": 1}}
67
+ )
68
+ except:
69
+ st.warning("MongoDB client not connected.")
70
  #st.line_chart(df,x="time", y="steering_angle")
71
  #st.dataframe(df)
72