Krishnan Kumar commited on
Commit
6dcde7a
1 Parent(s): 7370c97

Add app file

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -19,7 +19,14 @@ from google.cloud import aiplatform
19
  from google.protobuf import json_format
20
  from google.protobuf.struct_pb2 import Value
21
  import os
22
- os.environ['GOOGLE_APPLICATION_CREDENTIALS']=os.environ['API_KEY']
 
 
 
 
 
 
 
23
  def predict_custom_trained_model_sample(
24
  project: str,
25
  endpoint_id: str,
 
19
  from google.protobuf import json_format
20
  from google.protobuf.struct_pb2 import Value
21
  import os
22
+
23
+ content = os.environ['API_KEY']
24
+
25
+ with open('key.json', 'w') as file:
26
+ file.write(content)
27
+
28
+
29
+ os.environ['GOOGLE_APPLICATION_CREDENTIALS']= './key.json'
30
  def predict_custom_trained_model_sample(
31
  project: str,
32
  endpoint_id: str,