fariedalfarizi's picture
Critical fix: Add error suppression, pin dependencies, reduce logging to fix Content-Length error
dbc8e33
raw
history blame
960 Bytes
# =======================================
# ENTRY POINT - HUGGINGFACE SPACES
# Vocal Articulation Assessment v2.0
# =======================================
import os
import logging
# Suppress Starlette warnings
logging.getLogger("starlette").setLevel(logging.ERROR)
logging.getLogger("uvicorn").setLevel(logging.ERROR)
from app.interface import create_interface, initialize_model
if __name__ == '__main__':
print('Starting Vocal Articulation Assessment System v2.0...')
# Initialize model
initialize_model()
# Create and launch interface
demo = create_interface()
# Launch with specific config to avoid Content-Length issues
demo.launch(
server_name='0.0.0.0',
server_port=7860,
share=False,
show_error=False, # Disable detailed error pages that might cause encoding issues
max_threads=40, # Limit concurrent requests
quiet=True # Reduce logging
)