Spaces:
Sleeping
Sleeping
valentynliubchenko
commited on
Commit
·
60cf71d
1
Parent(s):
dab8ddf
fixed logger
Browse files- vertex_ai_service.py +6 -6
vertex_ai_service.py
CHANGED
|
@@ -32,17 +32,17 @@ class VertexAIService(ImageProcessingInterface):
|
|
| 32 |
:param json_key_path: Path to the JSON file (optional)
|
| 33 |
:param json_key_env_var: Environment variable name containing the JSON key (default 'GOOGLE_VERTEX_KEY')
|
| 34 |
"""
|
| 35 |
-
|
| 36 |
-
logger.info(os.getenv('GOOGLE_VERTEX_KEY_PATH'))
|
| 37 |
|
| 38 |
self.json_key_path = json_key_path or os.getenv('GOOGLE_VERTEX_KEY_PATH')
|
| 39 |
self.json_key_env_var = json_key_env_var or os.getenv('GOOGLE_VERTEX_KEY')
|
| 40 |
self.project = project or os.getenv('PROJECT_ID')
|
| 41 |
self.location = location or os.getenv('LOCATION')
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
|
| 47 |
self.credentials = self._authenticate_vertex_ai()
|
| 48 |
vertexai.init(project=self.project, location=self.location, credentials=self.credentials)
|
|
|
|
| 32 |
:param json_key_path: Path to the JSON file (optional)
|
| 33 |
:param json_key_env_var: Environment variable name containing the JSON key (default 'GOOGLE_VERTEX_KEY')
|
| 34 |
"""
|
| 35 |
+
# logger.info("json_key_path", json_key_path)
|
| 36 |
+
# logger.info(os.getenv('GOOGLE_VERTEX_KEY_PATH'))
|
| 37 |
|
| 38 |
self.json_key_path = json_key_path or os.getenv('GOOGLE_VERTEX_KEY_PATH')
|
| 39 |
self.json_key_env_var = json_key_env_var or os.getenv('GOOGLE_VERTEX_KEY')
|
| 40 |
self.project = project or os.getenv('PROJECT_ID')
|
| 41 |
self.location = location or os.getenv('LOCATION')
|
| 42 |
+
# logger.info(f'json_key_path: {self.json_key_path}')
|
| 43 |
+
# logger.info(f'json_key_env_var: {self.json_key_env_var}')
|
| 44 |
+
# logger.info(f'project: {self.project}')
|
| 45 |
+
# logger.info(f'location: {self.location}')
|
| 46 |
|
| 47 |
self.credentials = self._authenticate_vertex_ai()
|
| 48 |
vertexai.init(project=self.project, location=self.location, credentials=self.credentials)
|