File size: 832 Bytes
a8c648b
b49d049
4aab7ea
70d9836
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109e005
a0121b0
ecfa9d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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)