Sage
commited on
Commit
•
bd6c5bf
1
Parent(s):
d870c6e
changes
Browse files
app.py
CHANGED
@@ -101,7 +101,7 @@ def chat_gpt_document(content, document_type, context):
|
|
101 |
return json.dumps(property_info, indent=4)
|
102 |
|
103 |
def detect_image(content, lang):
|
104 |
-
credentials = os.environ['CREDENTIALS']
|
105 |
temp_file_path = 'temp_credentials.json'
|
106 |
with open(temp_file_path, 'w') as file:
|
107 |
json.dump(credentials, file)
|
@@ -128,7 +128,7 @@ def detect_image(content, lang):
|
|
128 |
return(response.full_text_annotation.text)
|
129 |
|
130 |
def detect_document(content):
|
131 |
-
credentials = os.environ['CREDENTIALS']
|
132 |
temp_file_path = 'temp_credentials.json'
|
133 |
with open(temp_file_path, 'w') as file:
|
134 |
json.dump(credentials, file)
|
|
|
101 |
return json.dumps(property_info, indent=4)
|
102 |
|
103 |
def detect_image(content, lang):
|
104 |
+
credentials = json.loads(os.environ['CREDENTIALS'])
|
105 |
temp_file_path = 'temp_credentials.json'
|
106 |
with open(temp_file_path, 'w') as file:
|
107 |
json.dump(credentials, file)
|
|
|
128 |
return(response.full_text_annotation.text)
|
129 |
|
130 |
def detect_document(content):
|
131 |
+
credentials = json.loads(os.environ['CREDENTIALS'])
|
132 |
temp_file_path = 'temp_credentials.json'
|
133 |
with open(temp_file_path, 'w') as file:
|
134 |
json.dump(credentials, file)
|