|
import os |
|
import subprocess |
|
|
|
from src.ui import create_ui |
|
|
|
try: |
|
version = subprocess.check_output(["minizinc", "--version"], text=True, stderr=subprocess.STDOUT) |
|
print(f"π§ MiniZinc version (from Docker env): {version.strip()}") |
|
except FileNotFoundError: |
|
print("β MiniZinc command not found. Check PATH in Dockerfile and setup.sh.") |
|
except subprocess.CalledProcessError as e: |
|
print(f"β MiniZinc command failed. Output: {e.output}") |
|
except Exception as e: |
|
print(f"β Error checking MiniZinc: {e}") |
|
|
|
if __name__ == "__main__": |
|
print("Starting the Gradio app...", flush=True) |
|
demo = create_ui() |
|
print("Gradio app created successfully.", flush=True) |
|
demo.queue().launch(server_name="0.0.0.0", server_port=7860, share=True, debug=True) |
|
print("Gradio app launched successfully.", flush=True) |