yogesh-venkat commited on
Commit
24981c5
Β·
verified Β·
1 Parent(s): 926da90

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -18,7 +18,7 @@ from ultralytics import YOLO
18
  from tensorflow.keras.applications.vgg16 import VGG16, preprocess_input as vgg16_preprocess
19
  from tensorflow.keras.applications.efficientnet import EfficientNetB0, preprocess_input as effnet_preprocess
20
 
21
- # ------------------------------------------------------------
22
  # GLOBAL CONFIG
23
  # ------------------------------------------------------------
24
  st.set_page_config(
@@ -709,10 +709,10 @@ YOLOv8 will detect all objects and optionally verify them with the best classifi
709
  col1, col2 = st.columns(2)
710
 
711
  with col1:
712
- st.image(pil_img, caption="Uploaded Image", width='stretch')
713
 
714
  with col2:
715
- st.image(result["annotated_image"], caption="Detected Result", width='stretch')
716
 
717
  st.write(f"YOLO inference time: {result['yolo_inference_time_sec']*1000:.1f} ms")
718
  st.write(f"Number of detections: {len(result['detections'])}")
@@ -749,18 +749,18 @@ elif page == "πŸ“Š Model Performance":
749
  with col1:
750
  st.bar_chart(
751
  df_cls.set_index("Model")["Accuracy"],
752
- width='stretch',
753
  )
754
  with col2:
755
  st.bar_chart(
756
  df_cls.set_index("Model")["F1 (weighted)"],
757
- width='stretch',
758
  )
759
 
760
  st.markdown("#### Inference Speed (images/sec)")
761
  st.bar_chart(
762
  df_cls.set_index("Model")["Images/sec"],
763
- width='stretch',
764
  )
765
 
766
  # --- YOLO metrics ---
@@ -791,7 +791,7 @@ elif page == "πŸ“Š Model Performance":
791
  ]
792
  if imgs:
793
  for img in sorted(imgs):
794
- st.image(img, caption=os.path.basename(img), width='stretch')
795
  else:
796
  st.info("No comparison plots found in `smartvision_metrics/comparison_plots/`.")
797
  else:
 
18
  from tensorflow.keras.applications.vgg16 import VGG16, preprocess_input as vgg16_preprocess
19
  from tensorflow.keras.applications.efficientnet import EfficientNetB0, preprocess_input as effnet_preprocess
20
 
21
+ # ------------------------------------------------------------use
22
  # GLOBAL CONFIG
23
  # ------------------------------------------------------------
24
  st.set_page_config(
 
709
  col1, col2 = st.columns(2)
710
 
711
  with col1:
712
+ st.image(pil_img, caption="Uploaded Image", width='content')
713
 
714
  with col2:
715
+ st.image(result["annotated_image"], caption="Detected Result", width='content')
716
 
717
  st.write(f"YOLO inference time: {result['yolo_inference_time_sec']*1000:.1f} ms")
718
  st.write(f"Number of detections: {len(result['detections'])}")
 
749
  with col1:
750
  st.bar_chart(
751
  df_cls.set_index("Model")["Accuracy"],
752
+ width='content',
753
  )
754
  with col2:
755
  st.bar_chart(
756
  df_cls.set_index("Model")["F1 (weighted)"],
757
+ width='content',
758
  )
759
 
760
  st.markdown("#### Inference Speed (images/sec)")
761
  st.bar_chart(
762
  df_cls.set_index("Model")["Images/sec"],
763
+ width='content',
764
  )
765
 
766
  # --- YOLO metrics ---
 
791
  ]
792
  if imgs:
793
  for img in sorted(imgs):
794
+ st.image(img, caption=os.path.basename(img), width='content')
795
  else:
796
  st.info("No comparison plots found in `smartvision_metrics/comparison_plots/`.")
797
  else: