Spaces:
Sleeping
Sleeping
Update main.py
Browse files
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)
|