Spaces:
Running
Running
File size: 793 Bytes
61ccd2e 639add2 61ccd2e 639add2 61ccd2e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# 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)
|