Skip to content

Commit

Permalink
Merge pull request #35 from CAUSOLDOUTMEN/feat/32-clova-ocr
Browse files Browse the repository at this point in the history
feat: inject environment variables with os module (#32)
  • Loading branch information
synoti21 authored Jan 29, 2024
2 parents 6ce441d + 426beb0 commit be3c693
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
*.env
*.jpeg
*.png
clova.conf.dev
3 changes: 0 additions & 3 deletions clova.conf

This file was deleted.

9 changes: 3 additions & 6 deletions utils/clova.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
import os
import requests
import uuid
import time
import json
import configparser


from utils.nutrition_parser import parse_nutrients_from_text



def clova_ocr(file, file_content):
parser = configparser.ConfigParser()
parser.read("./clova.conf")

api_url = parser.get("clova_credentials", "API_URL")
secret_key = parser.get("clova_credentials", "SECRET_KEY")
api_url = os.environ.get("API_URL")
secret_key = os.environ.get("SECRET_KEY")

request_json = {
'images': [
Expand Down

0 comments on commit be3c693

Please sign in to comment.