Gregniuki commited on
Commit
20134da
·
verified ·
1 Parent(s): fe39c08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -10,7 +10,9 @@ def install_flask():
10
  try:
11
  import flask
12
  except ImportError:
 
13
  subprocess.run([sys.executable, "-m", "pip", "install", "flask"], check=True)
 
14
 
15
  # Install Flask on startup
16
  install_flask()
 
10
  try:
11
  import flask
12
  except ImportError:
13
+ print("Flask not found. Installing Flask...")
14
  subprocess.run([sys.executable, "-m", "pip", "install", "flask"], check=True)
15
+ import flask # Try importing again after installation
16
 
17
  # Install Flask on startup
18
  install_flask()