ImageCaptionner / app.py
AOUNZakaria's picture
Rename hf_space_app.py to app.py
3ed08f2 verified
raw
history blame contribute delete
515 Bytes
"""
Hugging Face Spaces - Flask Application Entry Point
HF Spaces expects app.py with an 'app' variable
"""
import os
import sys
from pathlib import Path
# Add project root to path
BASE_DIR = Path(__file__).resolve().parent
sys.path.insert(0, str(BASE_DIR))
# Import Flask app from app package
# This will trigger model loading at startup
from app import app
# HF Spaces requires 'app' variable to be available
# The app is already created in app/__init__.py
# No need to run it here - Gunicorn will handle it