HFswapnil commited on
Commit
8655697
·
verified ·
1 Parent(s): f203360

Update src/main.py

Browse files
Files changed (1) hide show
  1. src/main.py +12 -0
src/main.py CHANGED
@@ -4,6 +4,14 @@ import sqlite3
4
  import hashlib
5
  from datetime import datetime
6
  from localization_eval import evaluate_submission
 
 
 
 
 
 
 
 
7
 
8
  # --- CONFIGURATION & SETUP ---
9
  st.set_page_config(
@@ -141,9 +149,13 @@ def main_app():
141
  with open(save_path, "wb") as f:
142
  f.write(uploaded_file.getbuffer())
143
 
 
144
  if st.button("Evaluate"):
145
  with st.spinner('Calculating score against Ground Truth...'):
 
 
146
  score = evaluate_submission("./biv_query.json", save_path)
 
147
  st.success(f"Score : {score}")
148
  if score is not None:
149
  save_submission(st.session_state['username'], score)
 
4
  import hashlib
5
  from datetime import datetime
6
  from localization_eval import evaluate_submission
7
+ import logging
8
+
9
+ logging.basicConfig(level=logging.INFO) # Configure the root logger
10
+
11
+ logging.basicConfig(
12
+ format='%(asctime)s - %(levelname)s - %(message)s',
13
+ level=logging.INFO
14
+ )
15
 
16
  # --- CONFIGURATION & SETUP ---
17
  st.set_page_config(
 
149
  with open(save_path, "wb") as f:
150
  f.write(uploaded_file.getbuffer())
151
 
152
+
153
  if st.button("Evaluate"):
154
  with st.spinner('Calculating score against Ground Truth...'):
155
+ logging.info("Calculating Score....")
156
+ logging.info(f"File location : {save_path}")
157
  score = evaluate_submission("./biv_query.json", save_path)
158
+ logging.info(f"Score Calculation Complete : {score}")
159
  st.success(f"Score : {score}")
160
  if score is not None:
161
  save_submission(st.session_state['username'], score)