import os import argparse from app import iface def main(): parser = argparse.ArgumentParser(description='Deploy Math Misconception Predictor') parser.add_argument('--host', type=str, default='0.0.0.0', help='Host to bind to') parser.add_argument('--port', type=int, default=7860, help='Port to bind to') parser.add_argument('--share', action='store_true', default=True, help='Create public link') parser.add_argument('--debug', action='store_true', default=False, help='Enable debug mode') parser.add_argument('--ssl-keyfile', type=str, help='SSL key file for HTTPS') parser.add_argument('--ssl-certfile', type=str, help='SSL certificate file for HTTPS') args = parser.parse_args() print(f"Starting Math Misconception Predictor...") print(f"Host: {args.host}") print(f"Port: {args.port}") print(f"Public Link: {'Yes' if args.share else 'No'}") print(f"Debug Mode: {'Yes' if args.debug else 'No'}") # Launch the app iface.launch( server_name=args.host, server_port=args.port, share=args.share, debug=args.debug, show_error=True, ssl_keyfile=args.ssl_keyfile, ssl_certfile=args.ssl_certfile, auth=None, auth_message="Welcome to Math Misconception Predictor!" ) if __name__ == "__main__": main()