Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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()
|