Spaces:
Running
Running
File size: 1,062 Bytes
da764f1 cb26165 da764f1 cb26165 54e865e cb26165 538987f ad0da04 da764f1 cb26165 da764f1 cb26165 da764f1 cb26165 |
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 27 28 29 30 31 32 33 34 35 36 37 38 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Main entry point for the Chorus Detection Streamlit app.
"""
import os
import sys
import logging
# Configure logging
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(levelname)s - %(name)s - %(message)s"
)
logger = logging.getLogger("chorus-detection")
# Log environment info when running in HF Space
if os.environ.get("SPACE_ID"):
logger.info(f"Running in Hugging Face Space: {os.environ.get('SPACE_ID')}")
logger.info(f"PYTHONPATH: {os.environ.get('PYTHONPATH')}")
logger.info(f"MODEL_REVISION: {os.environ.get('MODEL_REVISION')}")
logger.info(f"Current working directory: {os.getcwd()}")
logger.info(f"Directory contents: {os.listdir()}")
def main():
"""Main entry point for the Streamlit app."""
logger.info("Starting Streamlit app...")
import streamlit_app
streamlit_app.main()
if __name__ == "__main__":
try:
main()
except Exception as e:
logger.error(f"Error running main: {e}", exc_info=True)
sys.exit(1) |