-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsidebar.py
48 lines (27 loc) · 1.11 KB
/
sidebar.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import streamlit as st
import random
class Sidebar():
def __init__(self) -> None:
self.model_name = None
self.confidence_threshold = None
self.title_img = 'images\medical.jpg'
self._titleimage()
self._model()
self._confidencethreshold()
def _titleimage(self):
st.sidebar.image(self.title_img)
def _model(self):
st.sidebar.markdown('## Step 1: Choose model')
self.model_name = st.sidebar.selectbox(
label = 'Which Model would you like to choose from?',
options = [
'YoloV8',
'FastRCNN with ResNet',
'VGG16'
],
index = 0,
key = 'model_name'
)
def _confidencethreshold(self):
st.sidebar.markdown('## Step 2: Set a Threshold')
self.confidence_threshold = st.sidebar.slider("Confidence Threshold", 0.00,1.00,0.5,0.01)