-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathapp.py
44 lines (34 loc) · 1.18 KB
/
app.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
import os
import requests
import shutil
import sys
import streamlit as st
import streamlit.components.v1 as stc
import tooth_reconstruction
import display_app as udisp
#import Pulp_Segmentation
import root_seg
import fracture_tooth_detection
import flurosis_tooth_detection
import download_page
if os.path.exists("./MASK_RCNN_ROOT_SEGMENTATION"):
print("success")
elif os.path.exists("./dentaldiagnosistoolkitai/MASK_RCNN_ROOT_SEGMENTATION.pth"):
shutil.move('./dentaldiagnosistoolkitai/MASK_RCNN_ROOT_SEGMENTATION.pth', './MASK_RCNN_ROOT_SEGMENTATION.pth')
else:
os.system("git clone https://gitlab.com/sherwoodadithya/dentaldiagnosistoolkitai.git")
os.system("ls")
#os.system("ls")
#os.system("ifconfig")
MENU = {
"Fracture Tooth Detection" : fracture_tooth_detection,
"Root Anatomy Prediction" : root_seg,
"Flurosis Detection" : flurosis_tooth_detection,
"Tooth Fracture Reconstruction" : tooth_reconstruction,
"Download":download_page
}
st.sidebar.title("Choose A Use Case")
menu_selection = st.sidebar.radio("Use Case", list(MENU.keys()))
menu = MENU[menu_selection]
with st.spinner(f"Loading {menu_selection} ..."):
udisp.render_page(menu)