MLDeveloper commited on
Commit
330599d
·
verified ·
1 Parent(s): 00592db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -4,7 +4,11 @@ from dotenv import load_dotenv
4
  import google.generativeai as gen_ai
5
 
6
  # Load environment variables
7
- load_dotenv()
 
 
 
 
8
 
9
  # Configure Streamlit page settings
10
  st.set_page_config(
 
4
  import google.generativeai as gen_ai
5
 
6
  # Load environment variables
7
+ try:
8
+ load_dotenv()
9
+ except ModuleNotFoundError:
10
+ st.error("The `python-dotenv` module is not installed. Please install it using `pip install python-dotenv`.")
11
+ st.stop()
12
 
13
  # Configure Streamlit page settings
14
  st.set_page_config(