svsaurav95 commited on
Commit
10e2895
·
verified ·
1 Parent(s): 30a5939

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +3 -1
src/streamlit_app.py CHANGED
@@ -15,6 +15,8 @@ st.markdown("""
15
  </style>
16
  """, unsafe_allow_html=True)
17
 
 
 
18
  # === Model Definition ===
19
  class MobileViTSegmentation(nn.Module):
20
  def __init__(self, encoder_name='mobilevit_s', pretrained=False):
@@ -43,7 +45,7 @@ class MobileViTSegmentation(nn.Module):
43
  @st.cache_resource
44
  def load_model():
45
  model = MobileViTSegmentation()
46
- state_dict = torch.load("ToothSegmentation/mobilevit_teeth_segmentation.pth", map_location="cpu")
47
  model.load_state_dict(state_dict)
48
  model.eval()
49
  return model
 
15
  </style>
16
  """, unsafe_allow_html=True)
17
 
18
+ MODEL_PATH = mobilevit_teeth_segmentation.pth
19
+
20
  # === Model Definition ===
21
  class MobileViTSegmentation(nn.Module):
22
  def __init__(self, encoder_name='mobilevit_s', pretrained=False):
 
45
  @st.cache_resource
46
  def load_model():
47
  model = MobileViTSegmentation()
48
+ state_dict = torch.load( MODEL_PATH, map_location="cpu")
49
  model.load_state_dict(state_dict)
50
  model.eval()
51
  return model