Jainam Jain commited on
Commit
5bd8e50
1 Parent(s): f1518c0
Files changed (3) hide show
  1. .env +18 -22
  2. .gitignore +1 -0
  3. app.py +25 -2
.env CHANGED
@@ -1,22 +1,18 @@
1
- KEYS={
2
- "apiKey": "AIzaSyClnRJAnrJgAgkYjuYnlvu-CJ6Cxyklebo",
3
- "authDomain": "socioverse-2025.firebaseapp.com",
4
- "projectId": "socioverse-2025",
5
- "storageBucket": "socioverse-2025.appspot.com",
6
- "messagingSenderId": "689574504641",
7
- "appId": "1:689574504641:web:a22f6a2fa343e4221acc40",
8
- "databaseURL": "https://console.firebase.google.com/project/socioverse-2025/storage/socioverse-2025.appspot.com/files",
9
- "serviceAccount": {
10
- "type": "service_account",
11
- "project_id": "socioverse-2025",
12
- "private_key_id": "dde07d7cbca92e48903b77629995db2517ae90b7",
13
- "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDHti0sOlSFb9cY\n5A4o29ARzEsahhxtlSW29NtaZiWztZZ0WUmkvOPc3BDhV6LdwELXrT61rkXyA+YY\nzVxSZ9y/zMx9uH1iZKo7LsT/Y60xvuZlmWzBArrYVgrcYgNZZP27YLwDGj6G1GXI\npQfMeWlTfmfWbfM0q0kbOAWrCYhI7TL4+vPGvtU8rpFr+EZgeri88V7BxMW5J8mO\n9Hb4Hwy7pvSCczmLDTOY/SSn5eR/nxMReJBbi6dpH1kZESgpqNfoUrfdanD8Oe5W\nYXDSCQzZmFWWqRzmn9Qyl2uBWnKBOxB02KIrYdhuPa+9tHPxirteanRXeZYPit9B\nlSv4UD4rAgMBAAECggEAUyI5waxyXK2Gu5zLbCS8g3woU106Xj902Kkq2oGk9h8E\nB2DXsBTVQa319Of3KxoKeR9r+FMYWLtYwEBUSxVjJhBJm5f90cSXvFUmui0y/n86\nB1cLl3jccIu4r665ODA7ExIckaoOFzA5QoG4MlzkBFadQPy5/dXDc+opKd6o9bnS\ngX3eHtMN8uN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z4YDgCNl9ay9O\n-----END PRIVATE KEY-----\n",
14
- "client_email": "firebase-adminsdk-gcc6m@socioverse-2025.iam.gserviceaccount.com",
15
- "client_id": "107273420733077415353",
16
- "auth_uri": "https://accounts.google.com/o/oauth2/auth",
17
- "token_uri": "https://oauth2.googleapis.com/token",
18
- "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
19
- "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-gcc6m%40socioverse-2025.iam.gserviceaccount.com",
20
- "universe_domain": "googleapis.com"
21
- }
22
- };
 
1
+ API_KEY=AIzaSyClnRJAnrJgAgkYjuYnlvu-CJ6Cxyklebo
2
+ authDomain_KEY=socioverse-2025.firebaseapp.com
3
+ projectId_KEY=socioverse-2025
4
+ storageBucket_KEY=socioverse-2025.appspot.com
5
+ messagingSenderId_KEY=689574504641
6
+ appId_KEY=1:689574504641:web:a22f6a2fa343e4221acc40
7
+ databaseURL_KEY=https://console.firebase.google.com/project/socioverse-2025/storage/socioverse-2025.appspot.com/files
8
+ type_KEY=service_account
9
+ project_id_KEY=socioverse-2025
10
+ private_key_id_KEY=dde07d7cbca92e48903b77629995db2517ae90b7
11
+ private_key_KEY=-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDHti0sOlSFb9cY\n5A4o29ARzEsahhxtlSW29NtaZiWztZZ0WUmkvOPc3BDhV6LdwELXrT61rkXyA+YY\nzVxSZ9y/zMx9uH1iZKo7LsT/Y60xvuZlmWzBArrYVgrcYgNZZP27YLwDGj6G1GXI\npQfMeWlTfmfWbfM0q0kbOAWrCYhI7TL4+vPGvtU8rpFr+EZgeri88V7BxMW5J8mO\n9Hb4Hwy7pvSCczmLDTOY/SSn5eR/nxMReJBbi6dpH1kZESgpqNfoUrfdanD8Oe5W\nYXDSCQzZmFWWqRzmn9Qyl2uBWnKBOxB02KIrYdhuPa+9tHPxirteanRXeZYP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3OMqOGtJZRsu2R+Mjg9gUNtF6nJV/cymJDwKBgDNI2KpHrNA/7zeolXXY\nADu0kH+ytW4kxDuS1Lq90Nhuf5CXzRMA4pzozlJvqeOv+gj4uqX/DxLZaQ2p3Fqo\noKVJBrI63mxzu6Wambj9E6CdYelov+Ekb5X8IKFp2ntfaNPYNQGXdqbgqE10AVLS\n5Gbrgxn2+88Z4YDgCNl9ay9O\n-----END PRIVATE KEY-----\n
12
+ client_email_KEY=firebase-adminsdk-gcc6m@socioverse-2025.iam.gserviceaccount.com
13
+ client_id_KEY=107273420733077415353
14
+ auth_uri_KEY=https://accounts.google.com/o/oauth2/auth
15
+ token_uri_KEY=https://oauth2.googleapis.com/token
16
+ auth_provider_x509_cert_url_KEY=https://www.googleapis.com/oauth2/v1/certs
17
+ client_x509_cert_url_KEY=https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-gcc6m%40socioverse-2025.iam.gserviceaccount.com
18
+ universe_domain_KEY=googleapis.com
 
 
 
 
.gitignore CHANGED
@@ -4,3 +4,4 @@ venv/
4
  # Ignore the lib directory
5
  Lib/
6
 
 
 
4
  # Ignore the lib directory
5
  Lib/
6
 
7
+ .env
app.py CHANGED
@@ -4,16 +4,39 @@ import urllib
4
  from retinaface import RetinaFace
5
  from deepface import DeepFace
6
  from fastapi import FastAPI
 
7
  from dotenv import load_dotenv
8
  app = FastAPI()
9
- load_dotenv()
10
  @app.get("/")
11
  def read_root():
12
  return {"Hello": "World"}
13
 
14
  @app.get("/verify/")
15
  def verify_image(url1):
16
- firebaseConfig = 'KEYS'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  firebase = pyrebase.initialize_app(firebaseConfig)
18
  storage = firebase.storage()
19
  path = "Faces/"
 
4
  from retinaface import RetinaFace
5
  from deepface import DeepFace
6
  from fastapi import FastAPI
7
+ import os
8
  from dotenv import load_dotenv
9
  app = FastAPI()
10
+ load_dotenv
11
  @app.get("/")
12
  def read_root():
13
  return {"Hello": "World"}
14
 
15
  @app.get("/verify/")
16
  def verify_image(url1):
17
+ firebaseConfig = {
18
+ "apiKey": os.getenv("API_KEY"),
19
+ "authDomain": os.getenv("authDomain_KEY"),
20
+ "projectId": os.getenv("projectId_KEY"),
21
+ "storageBucket": os.getenv("storageBucket_KEY"),
22
+ "messagingSenderId": os.getenv("messagingSenderId_KEY"),
23
+ "appId": os.getenv("appId_KEY"),
24
+ "databaseURL": os.getenv("databaseURL_KEY"),
25
+ "serviceAccount": {
26
+ "type": os.getenv("type_KEY"),
27
+ "project_id": os.getenv("project_id_KEY"),
28
+ "private_key_id": os.getenv("private_key_id_KEY"),
29
+ "private_key": os.getenv("private_key_KEY").replace('\\n', '\n'),
30
+ "client_email": os.getenv("client_email_KEY"),
31
+ "client_id":os.getenv("client_id_KEY"),
32
+ "auth_uri": os.getenv("auth_uri_KEY"),
33
+ "token_uri": os.getenv("token_uri_KEY"),
34
+ "auth_provider_x509_cert_url": os.getenv("auth_provider_x509_cert_url_KEY"),
35
+ "client_x509_cert_url": os.getenv("client_x509_cert_url_KEY"),
36
+ "universe_domain": os.getenv("universe_domain_KEY")
37
+ }
38
+
39
+ };
40
  firebase = pyrebase.initialize_app(firebaseConfig)
41
  storage = firebase.storage()
42
  path = "Faces/"