DjPapzin commited on
Commit
313e620
·
1 Parent(s): ecf7286

Renamed FINAL_MODEL.zip to FINAL_MODEL.keras

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -45,13 +45,13 @@ st.title("Medi Scape Dashboard")
45
  # --- Session State Initialization ---
46
  if 'disease_model' not in st.session_state:
47
  try:
48
- model_path = 'FINAL_MODEL.zip'
49
  print(f"Attempting to load disease model from: {model_path}")
50
  print(f"Model file exists: {os.path.exists(model_path)}")
51
  st.session_state.disease_model = tf.keras.models.load_model(model_path)
52
  print("Disease model loaded successfully!")
53
  except FileNotFoundError:
54
- st.error("Disease classification model not found. Please ensure 'FINAL_MODEL.zip' is in the same directory as this app.")
55
  st.session_state.disease_model = None
56
 
57
  # Load the vectorizer
@@ -97,9 +97,9 @@ if 'model_llm' not in st.session_state:
97
 
98
  # Load the disease classification model
99
  try:
100
- disease_model = tf.keras.models.load_model('FINAL_MODEL.zip')
101
  except FileNotFoundError:
102
- st.error("Disease classification model not found. Please ensure 'FINAL_MODEL.zip' is in the same directory as this app.")
103
  disease_model = None
104
 
105
  # Sidebar Navigation
 
45
  # --- Session State Initialization ---
46
  if 'disease_model' not in st.session_state:
47
  try:
48
+ model_path = 'FINAL_MODEL.keras'
49
  print(f"Attempting to load disease model from: {model_path}")
50
  print(f"Model file exists: {os.path.exists(model_path)}")
51
  st.session_state.disease_model = tf.keras.models.load_model(model_path)
52
  print("Disease model loaded successfully!")
53
  except FileNotFoundError:
54
+ st.error("Disease classification model not found. Please ensure 'FINAL_MODEL.keras' is in the same directory as this app.")
55
  st.session_state.disease_model = None
56
 
57
  # Load the vectorizer
 
97
 
98
  # Load the disease classification model
99
  try:
100
+ disease_model = tf.keras.models.load_model('FINAL_MODEL.keras')
101
  except FileNotFoundError:
102
+ st.error("Disease classification model not found. Please ensure 'FINAL_MODEL.keras' is in the same directory as this app.")
103
  disease_model = None
104
 
105
  # Sidebar Navigation