elsoori commited on
Commit
b062b7d
1 Parent(s): 3b73990

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -39,7 +39,14 @@ if uploaded_file:
39
  cell_counts = {"RBC": 0, "WBC": 0, "Platelets": 0}
40
 
41
 
42
- # Display details of detected boxes
 
 
 
 
 
 
 
43
  st.write("Detection Results:")
44
  for box in results[0].boxes:
45
  class_index = int(box.cls) # Get the class index
@@ -53,12 +60,5 @@ if uploaded_file:
53
  # Display the counts of each cell type
54
  st.write("Cell Type Counts:")
55
  st.write(pd.DataFrame.from_dict(cell_counts, orient='index', columns=['Count']))
56
-
57
- else:
58
- for box in results[0].boxes:
59
- st.write(f"Bounding box: {box.xyxy}")
60
- st.write(f"Confidence: {box.conf}")
61
- st.write(f"Class: {box.cls}")
62
-
63
  else:
64
  st.write("Upload an image to start detection")
 
39
  cell_counts = {"RBC": 0, "WBC": 0, "Platelets": 0}
40
 
41
 
42
+
43
+
44
+ else:
45
+ for box in results[0].boxes:
46
+ st.write(f"Bounding box: {box.xyxy}")
47
+ st.write(f"Confidence: {box.conf}")
48
+ st.write(f"Class: {box.cls}")
49
+ # Display details of detected boxes
50
  st.write("Detection Results:")
51
  for box in results[0].boxes:
52
  class_index = int(box.cls) # Get the class index
 
60
  # Display the counts of each cell type
61
  st.write("Cell Type Counts:")
62
  st.write(pd.DataFrame.from_dict(cell_counts, orient='index', columns=['Count']))
 
 
 
 
 
 
 
63
  else:
64
  st.write("Upload an image to start detection")