GoodLuckChuck commited on
Commit
a2b55aa
·
verified ·
1 Parent(s): f9491c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -23,9 +23,6 @@ import pillow_heif # --- ADDED TO SUPPORT HEIC/HEIF IMAGE FORMATS
23
  # This line registers the HEIC/HEIF plugin with Pillow
24
  pillow_heif.register_heif_opener()
25
 
26
- # --- NEW: Define paths relative to the script's location for robustness ---
27
- SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
28
-
29
  logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
30
  logger = logging.getLogger(__name__)
31
 
@@ -38,9 +35,9 @@ if not client.api_key:
38
  # In a live app, you might want a more visible error in the UI
39
  # raise ValueError("Missing OPENAI_API_KEY")
40
 
41
- PROMPT_FILE_RECIPE_CONVERTER = os.path.join(SCRIPT_DIR, "prompts/recipe_converter.xml")
42
- PROMPT_FILE_WEB_SEARCH = os.path.join(SCRIPT_DIR, "prompts/web_search_query_generator.xml")
43
- RECIPE_DIR = os.path.join(SCRIPT_DIR, "recipes") # Directory for local PDF/text recipes
44
  GPT_MODEL = "gpt-3.5-turbo"
45
 
46
  # --- Pydantic Models (Unchanged) ---
 
23
  # This line registers the HEIC/HEIF plugin with Pillow
24
  pillow_heif.register_heif_opener()
25
 
 
 
 
26
  logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
27
  logger = logging.getLogger(__name__)
28
 
 
35
  # In a live app, you might want a more visible error in the UI
36
  # raise ValueError("Missing OPENAI_API_KEY")
37
 
38
+ PROMPT_FILE_RECIPE_CONVERTER = "prompts/recipe_converter.xml"
39
+ PROMPT_FILE_WEB_SEARCH = "prompts/web_search_query_generator.xml"
40
+ RECIPE_DIR = "recipes" # Directory for local PDF/text recipes
41
  GPT_MODEL = "gpt-3.5-turbo"
42
 
43
  # --- Pydantic Models (Unchanged) ---