projektkush commited on
Commit
f582612
1 Parent(s): 67f840e

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +7 -7
  2. decrypted.json +13 -0
app.py CHANGED
@@ -25,15 +25,15 @@ from dotenv import load_dotenv
25
 
26
  load_dotenv( )
27
 
28
- # # Load the decrypted JSON file or its content as environment variable
29
- # decrypted_service_account_path = "/Users/kush/Desktop/DATA_BACKUP_FINALLY/2024_PROJECTS_SHOW_ALL/VISION_PROJECTS/google_genai_hack/decrypted.json"
30
- # decrypted_service_account_path
31
- # with open(decrypted_service_account_path, 'r') as f:
32
- # service_account_info = json.load(f)
33
 
34
 
35
- service_account_json = pybase64.b64decode(os.getenv("IMAGEN"))
36
- service_account_info = json.loads(service_account_json)
37
  credentials = service_account.Credentials.from_service_account_info(service_account_info)
38
  project="elemental-shine-437217-t6"
39
  aiplatform.init(project=project, credentials=credentials)
 
25
 
26
  load_dotenv( )
27
 
28
+ # Load the decrypted JSON file or its content as environment variable
29
+ decrypted_service_account_path = "/Users/kush/Desktop/DATA_BACKUP_FINALLY/2024_PROJECTS_SHOW_ALL/VISION_PROJECTS/google_genai_hack/decrypted.json"
30
+ decrypted_service_account_path
31
+ with open(decrypted_service_account_path, 'r') as f:
32
+ service_account_info = json.load(f)
33
 
34
 
35
+ # service_account_json = pybase64.b64decode(os.getenv("IMAGEN"))
36
+ # service_account_info = json.loads(service_account_json)
37
  credentials = service_account.Credentials.from_service_account_info(service_account_info)
38
  project="elemental-shine-437217-t6"
39
  aiplatform.init(project=project, credentials=credentials)
decrypted.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "service_account",
3
+ "project_id": "elemental-shine-437217-t6",
4
+ "private_key_id": "addd683b29972d720462ebe78f274a748dc94997",
5
+ "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDDBHTEfj+1w2e1\nfI7nSGXDBdpqj9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9phxmmNDTNkcdPaBrXYc6A\nlVXupwWY6TkYxEyxg8V4UyzNko36OirVpEKVIwHK5gajh5yXWXDzOMms7DKaRgiK\niD6yYhdvGQq8TqMR37+jZ9wVvSVBpzaLV+rRpuJtre0FLVCBO7nJJw/xeQKBgDS2\n3GevQTzCD4c7zJSUzWQd29llxEi4f4tkaFxzadqtVTqmDMgDds8yH/rHLdFzoSfp\n9xYEmt8u4W/F+bcDC64Gd9kspHJmxysyv3ySdTTUtZFE77jSXSEzU7F9+Oef1fb/\n8YxYO3mHGg7le4YiZ9N1sRuGpU2b0jfYFX8iSNKvAoGBALRb6Iw9Y6t0NrnuzpZZ\nGmuKcd/QjPka3O2NNRAYuhpdq5NR+zMpA+02J0DN3B5fqf7+zp5fb51rQyj67rCx\ntV5zReSSbOnb+JOaXQiM1y+vTh5Mvk9fWM5sKCRkGqdYI/LLCGnS+hU31zpYkF5j\n2sERJY69qRmS/oeUAdp0gZbH\n-----END PRIVATE KEY-----\n",
6
+ "client_email": "imagen3-googlegenai@elemental-shine-437217-t6.iam.gserviceaccount.com",
7
+ "client_id": "108940472789603339661",
8
+ "auth_uri": "https://accounts.google.com/o/oauth2/auth",
9
+ "token_uri": "https://oauth2.googleapis.com/token",
10
+ "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
11
+ "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/imagen3-googlegenai%40elemental-shine-437217-t6.iam.gserviceaccount.com",
12
+ "universe_domain": "googleapis.com"
13
+ }