File size: 879 Bytes
aa8b25c e67d561 34e8992 aa8b25c 34e8992 aa8b25c 34e8992 e67d561 34e8992 36ea38b b5712a3 180f9fe 34e8992 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
from src.ui import create_ui
import os
import subprocess
try:
version = subprocess.check_output(["minizinc", "--version"], text=True, stderr=subprocess.STDOUT)
print(f"π§ MiniZinc version (from Docker env): {version.strip()}")
# Optional: Check for solvers to confirm full setup
solvers = subprocess.check_output(["minizinc", "--solvers"], text=True, stderr=subprocess.STDOUT)
print(f"π‘ MiniZinc solvers (from Docker env):\n{solvers.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__":
demo = create_ui()
demo.queue().launch() # HF Spaces usually uses port 7860 by default |