Skip to content
This repository has been archived by the owner on Jan 23, 2022. It is now read-only.

Commit

Permalink
Ability to select pretrained model
Browse files Browse the repository at this point in the history
  • Loading branch information
TKassis committed Feb 2, 2020
1 parent 71c1fce commit 6027ac5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions orgaquant.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@

st.title('OrgaQuant: Organoid Quantification')

st.sidebar.header('Settings')

model_path = st.sidebar.text_input("Saved model to use (stored in train_models folder):", value='orgaquant_intestinal_v3')

#@st.cache(allow_output_mutation=True)
def load_orga_model():
model = models.load_model("trained_models/orgaquant_intestinal_v2.h5", backbone_name='resnet50')
model = models.load_model(os.path.join('trained_models', model_path + '.h5'), backbone_name='resnet50')
return model

model = load_orga_model()

st.sidebar.header('Settings')

folder_path = st.sidebar.text_input("Path to folder containing images:", value='test_folder')

Expand Down

0 comments on commit 6027ac5

Please sign in to comment.