File size: 973 Bytes
fcdda81 1f3a6dd fcdda81 7c84a04 | 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 | """
Hugging Face Production Runtime Wrapper.
Uses clean top-level paths to completely eliminate circular naming loops.
"""
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
# Now import your interface
from app.application_interface import interface_assembly
if __name__ == "__main__":
interface_assembly.launch()
# Compute root project directory absolute path
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
# Insert project root at the very front of the path lookup array
if PROJECT_ROOT not in sys.path:
sys.path.insert(0, PROJECT_ROOT)
# Import the interface runtime assembly safely from the app folder package
from app.application_interface import interface_assembly
if __name__ == "__main__":
# Force server name to 0.0.0.0 and disable sharing mechanisms for cloud deployment
interface_assembly.launch(
server_name="0.0.0.0",
server_port=7860,
share=False
) |