#!/usr/bin/env python3 import os import sys # Para que Python vea src/mortis CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) SRC_DIR = os.path.join(CURRENT_DIR, "src") if SRC_DIR not in sys.path: sys.path.append(SRC_DIR) from mortis.app import ui # o tu función que crea el chatbot # ⚙️ Hugging Face pasa el puerto en la variable PORT port = int(os.getenv("PORT", "7860")) demo = ui() # aquí dentro montas tu Chatbot/ChatInterface if __name__ == "__main__": demo.launch( server_name="0.0.0.0", # ¡IMPORTANTE en Docker! server_port=port, show_error=True, )