DjPapzin commited on
Commit
6b2aa01
·
1 Parent(s): 2d87619

fix: Handle potential errors during LLM model loading

Browse files
Files changed (1) hide show
  1. frontend/app.py +3 -0
frontend/app.py CHANGED
@@ -110,6 +110,9 @@ if 'model_llm' not in st.session_state:
110
  except FileNotFoundError:
111
  st.error("LLM model file not found. Please ensure 'logistic_regression_model.pkl' is in the 'frontend' directory.")
112
  st.session_state.model_llm = None
 
 
 
113
 
114
  # Load datasets (only for reference, not used for training)
115
  dataset_1 = pd.read_csv("Symptoms_Detection/training_data.csv")
 
110
  except FileNotFoundError:
111
  st.error("LLM model file not found. Please ensure 'logistic_regression_model.pkl' is in the 'frontend' directory.")
112
  st.session_state.model_llm = None
113
+ except Exception as e:
114
+ st.error(f"An error occurred while loading the LLM model: {e}")
115
+ st.session_state.model_llm = None
116
 
117
  # Load datasets (only for reference, not used for training)
118
  dataset_1 = pd.read_csv("Symptoms_Detection/training_data.csv")