kostis-init's picture
add server config back
a0121b0
raw
history blame contribute delete
832 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(server_name="0.0.0.0", server_port=7860, share=True, debug=True)
print("Gradio app launched successfully.", flush=True)