Zwounds commited on
Commit
639add2
·
verified ·
1 Parent(s): 154ae3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py CHANGED
@@ -1,7 +1,24 @@
1
  # This file is for Hugging Face Spaces deployment
2
  # It simply imports and runs the main app
3
 
 
4
  from cv_extraction_app import app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
  # Launch the app with specific settings for Hugging Face Spaces
7
  if __name__ == "__main__":
 
1
  # This file is for Hugging Face Spaces deployment
2
  # It simply imports and runs the main app
3
 
4
+ import os
5
  from cv_extraction_app import app
6
+ import logging
7
+
8
+ # Configure logging
9
+ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
10
+
11
+ # Set up environment variables for Pydantic-AI
12
+ if os.environ.get('GOOGLE_API_KEY'):
13
+ os.environ['GEMINI_API_KEY'] = os.environ.get('GOOGLE_API_KEY')
14
+ logging.info("GOOGLE_API_KEY is set and copied to GEMINI_API_KEY")
15
+ else:
16
+ logging.warning("GOOGLE_API_KEY is not set")
17
+
18
+ if os.environ.get('APP_PASSWORD'):
19
+ logging.info("APP_PASSWORD is set")
20
+ else:
21
+ logging.warning("APP_PASSWORD is not set")
22
 
23
  # Launch the app with specific settings for Hugging Face Spaces
24
  if __name__ == "__main__":