kostis-init's picture
remove subprocess
ecfa9d2
raw
history blame
769 Bytes
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()
print("Gradio app launched successfully.", flush=True)