tuan243 commited on
Commit
4793084
·
verified ·
1 Parent(s): d8cf7a3

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +7 -0
main.py CHANGED
@@ -7,6 +7,13 @@ from typing import List, Optional
7
  from huggingface_hub import login
8
  from fastapi.responses import JSONResponse
9
 
 
 
 
 
 
 
 
10
  # Load Firebase
11
  cred = credentials.Certificate("firebase_config.json")
12
  firebase_admin.initialize_app(cred)
 
7
  from huggingface_hub import login
8
  from fastapi.responses import JSONResponse
9
 
10
+
11
+ import os
12
+
13
+ if not os.path.exists("firebase_config.json"):
14
+ raise FileNotFoundError("Không tìm thấy file firebase_config.json")
15
+
16
+
17
  # Load Firebase
18
  cred = credentials.Certificate("firebase_config.json")
19
  firebase_admin.initialize_app(cred)