Spaces:
Sleeping
Sleeping
update
Browse files
utils.py
CHANGED
@@ -13,10 +13,9 @@ import json
|
|
13 |
def getcredentials():
|
14 |
secret_key_credential = os.getenv("cloud_vision")
|
15 |
|
16 |
-
with tempfile.NamedTemporaryFile(mode='w+', delete=
|
17 |
-
temp_file.write(
|
18 |
-
|
19 |
-
tempfile_name = temp_file.name
|
20 |
|
21 |
return tempfile_name
|
22 |
|
|
|
13 |
def getcredentials():
|
14 |
secret_key_credential = os.getenv("cloud_vision")
|
15 |
|
16 |
+
with tempfile.NamedTemporaryFile(mode='w+', delete= False, suffix=".json") as temp_file:
|
17 |
+
temp_file.write(secret_key_credential)
|
18 |
+
tempfile_name = temp_file.name
|
|
|
19 |
|
20 |
return tempfile_name
|
21 |
|