Spaces:
Sleeping
Sleeping
Update ocr_llm_utils.py
Browse fileshandling write permissions
- ocr_llm_utils.py +3 -2
ocr_llm_utils.py
CHANGED
|
@@ -12,9 +12,10 @@ load_dotenv()
|
|
| 12 |
# Save secret JSON string to a temporary file
|
| 13 |
gcv_json_str = os.environ.get("GCV_JSON")
|
| 14 |
if gcv_json_str:
|
| 15 |
-
|
|
|
|
| 16 |
f.write(gcv_json_str)
|
| 17 |
-
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] =
|
| 18 |
|
| 19 |
client = Groq(api_key=os.getenv("GROQ_API_KEY"))
|
| 20 |
|
|
|
|
| 12 |
# Save secret JSON string to a temporary file
|
| 13 |
gcv_json_str = os.environ.get("GCV_JSON")
|
| 14 |
if gcv_json_str:
|
| 15 |
+
temp_path = "/tmp/gcv_temp.json"
|
| 16 |
+
with open("temp_path", "w") as f:
|
| 17 |
f.write(gcv_json_str)
|
| 18 |
+
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = temp_path
|
| 19 |
|
| 20 |
client = Groq(api_key=os.getenv("GROQ_API_KEY"))
|
| 21 |
|