Zwounds's picture
Update app.py
639add2 verified
raw
history blame contribute delete
793 Bytes
# This file is for Hugging Face Spaces deployment
# It simply imports and runs the main app
import os
from cv_extraction_app import app
import logging
# Configure logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
# Set up environment variables for Pydantic-AI
if os.environ.get('GOOGLE_API_KEY'):
os.environ['GEMINI_API_KEY'] = os.environ.get('GOOGLE_API_KEY')
logging.info("GOOGLE_API_KEY is set and copied to GEMINI_API_KEY")
else:
logging.warning("GOOGLE_API_KEY is not set")
if os.environ.get('APP_PASSWORD'):
logging.info("APP_PASSWORD is set")
else:
logging.warning("APP_PASSWORD is not set")
# Launch the app with specific settings for Hugging Face Spaces
if __name__ == "__main__":
app.launch(share=False)