m7mdal7aj commited on
Commit
736e48a
1 Parent(s): bf90d40

Update my_model/results/demo.py

Browse files
Files changed (1) hide show
  1. my_model/results/demo.py +3 -3
my_model/results/demo.py CHANGED
@@ -87,7 +87,7 @@ class ResultDemonstrator:
87
 
88
  def display_main_results(self) -> None:
89
  """Displays the main model results from the Scores sheet, these are displayed from the file directly."""
90
- main_scores = pd.read_excel('evaluation_results.xlsx', sheet_name="Scores", index_col=0)
91
  st.markdown("### Main Model Results (Inclusive of Ablation Experiments)")
92
  main_scores.reset_index()
93
  self.display_table(main_scores)
@@ -208,7 +208,7 @@ class ResultDemonstrator:
208
 
209
  for img_filename in target_imgs:
210
  image_data = self.main_data[self.main_data['image_filename'] == img_filename]
211
- im = Image.open(f"demo/{img_filename}")
212
  col1, col2 = st.columns([1, 2]) # to display images side by side with their data.
213
  # Create a container for each image
214
  with st.container():
@@ -223,7 +223,7 @@ class ResultDemonstrator:
223
  st.text(image_data.iloc[0]['objects_yolov5'])
224
  with col2:
225
  if not image_data.empty:
226
- st.write(f"**Question: {image_data.iloc[0]['question']}**")
227
  st.write(f"**Ground Truth Answers:** {image_data.iloc[0]['raw_answers']}")
228
 
229
  # Initialize an empty DataFrame for summary data
 
87
 
88
  def display_main_results(self) -> None:
89
  """Displays the main model results from the Scores sheet, these are displayed from the file directly."""
90
+ main_scores = pd.read_excel(config.EVALUATION_DATA_PATH, sheet_name="Scores", index_col=0)
91
  st.markdown("### Main Model Results (Inclusive of Ablation Experiments)")
92
  main_scores.reset_index()
93
  self.display_table(main_scores)
 
208
 
209
  for img_filename in target_imgs:
210
  image_data = self.main_data[self.main_data['image_filename'] == img_filename]
211
+ im = Image.open(f"config.DEMO_IMAGES_PATH/{img_filename}")
212
  col1, col2 = st.columns([1, 2]) # to display images side by side with their data.
213
  # Create a container for each image
214
  with st.container():
 
223
  st.text(image_data.iloc[0]['objects_yolov5'])
224
  with col2:
225
  if not image_data.empty:
226
+ st.write(f"**Question:** {image_data.iloc[0]['question']}")
227
  st.write(f"**Ground Truth Answers:** {image_data.iloc[0]['raw_answers']}")
228
 
229
  # Initialize an empty DataFrame for summary data