Jainam Jain commited on
Commit
5c63934
·
1 Parent(s): 517884d
Files changed (2) hide show
  1. app.py +10 -19
  2. requirements.txt +1 -3
app.py CHANGED
@@ -4,11 +4,6 @@ import urllib
4
  from retinaface import RetinaFace
5
  from deepface import DeepFace
6
  from fastapi import FastAPI
7
- import firebase_admin
8
- from firebase_admin import credentials
9
- from decouple import config
10
- cred = credentials.Certificate("path/to/serviceAccountKey.json")
11
- firebase_admin.initialize_app(cred)
12
 
13
  app = FastAPI()
14
 
@@ -18,20 +13,16 @@ def read_root():
18
 
19
  @app.get("/verify/")
20
  def verify_image(url1):
21
- firebase_config = {
22
- "apiKey": config("FIREBASE_API_KEY"),
23
- "authDomain": config("FIREBASE_AUTH_DOMAIN"),
24
- "projectId": config("FIREBASE_PROJECT_ID"),
25
- "storageBucket": config("FIREBASE_STORAGE_BUCKET"),
26
- "messagingSenderId": config("FIREBASE_MESSAGING_SENDER_ID"),
27
- "appId": config("FIREBASE_APP_ID"),
28
- "databaseURL": config("FIREBASE_DATABASE_URL"),
29
- "serviceAccount": f"{cred}"
30
- }
31
-
32
- # Initialize the Firebase app with the service account JSON
33
- cred = credentials.Certificate(firebase_config['serviceAccount'])
34
- firebase_admin
35
  firebase = pyrebase.initialize_app(firebaseConfig)
36
  storage = firebase.storage()
37
  path = "Faces/"
 
4
  from retinaface import RetinaFace
5
  from deepface import DeepFace
6
  from fastapi import FastAPI
 
 
 
 
 
7
 
8
  app = FastAPI()
9
 
 
13
 
14
  @app.get("/verify/")
15
  def verify_image(url1):
16
+ firebaseConfig ={
17
+ "apiKey": "AIzaSyClnRJAnrJgAgkYjuYnlvu-CJ6Cxyklebo",
18
+ "authDomain": "socioverse-2025.firebaseapp.com",
19
+ "projectId": "socioverse-2025",
20
+ "storageBucket": "socioverse-2025.appspot.com",
21
+ "messagingSenderId": "689574504641",
22
+ "appId": "1:689574504641:web:a22f6a2fa343e4221acc40",
23
+ "databaseURL": "https://console.firebase.google.com/project/socioverse-2025/storage/socioverse-2025.appspot.com/files",
24
+ "serviceAccount":"Firebase_Service_Account_Keys.json"
25
+ };
 
 
 
 
26
  firebase = pyrebase.initialize_app(firebaseConfig)
27
  storage = firebase.storage()
28
  path = "Faces/"
requirements.txt CHANGED
@@ -8,6 +8,4 @@ fastapi==0.104.0
8
  python-dateutil==2.8.2
9
  python-jwt==4.0.0
10
  pydantic==2.4.2
11
- pydantic_core==2.10.1
12
- firebase_admin
13
- python-decouple
 
8
  python-dateutil==2.8.2
9
  python-jwt==4.0.0
10
  pydantic==2.4.2
11
+ pydantic_core==2.10.1