Update app.py
Browse files
app.py
CHANGED
@@ -147,17 +147,17 @@ def run_inference():
|
|
147 |
|
148 |
# Set default confidence based on the selected model
|
149 |
default_confidence = 0.2 if detection_model == "yolov5" else 0.4
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
|
162 |
|
163 |
# Main function
|
|
|
147 |
|
148 |
# Set default confidence based on the selected model
|
149 |
default_confidence = 0.2 if detection_model == "yolov5" else 0.4
|
150 |
+
if st.session_state['kbvqa']:
|
151 |
+
# Slider for confidence level
|
152 |
+
confidence_level = st.slider(
|
153 |
+
"Select Detection Confidence Level",
|
154 |
+
min_value=0.1,
|
155 |
+
max_value=0.9,
|
156 |
+
value=default_confidence,
|
157 |
+
step=0.1
|
158 |
+
)
|
159 |
+
|
160 |
+
st.session_state['kbvqa'].detection_confidence = confidence_level
|
161 |
|
162 |
|
163 |
# Main function
|