Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,6 +21,8 @@ from google.cloud import storage
|
|
21 |
|
22 |
# Update the path below to your Firebase service account key JSON file
|
23 |
SERVICE_ACCOUNT_KEY = "serviceAccountKey.json" # <-- Ensure this file exists in your project directory
|
|
|
|
|
24 |
|
25 |
# Initialize Firebase Admin for Realtime Database
|
26 |
cred = credentials.Certificate(SERVICE_ACCOUNT_KEY)
|
|
|
21 |
|
22 |
# Update the path below to your Firebase service account key JSON file
|
23 |
SERVICE_ACCOUNT_KEY = "serviceAccountKey.json" # <-- Ensure this file exists in your project directory
|
24 |
+
if not os.path.exists(SERVICE_ACCOUNT_KEY):
|
25 |
+
raise FileNotFoundError(f"Firebase credentials file {SERVICE_ACCOUNT_KEY} not found!")
|
26 |
|
27 |
# Initialize Firebase Admin for Realtime Database
|
28 |
cred = credentials.Certificate(SERVICE_ACCOUNT_KEY)
|