Spaces:
Runtime error
Runtime error
Deploy Palate multi-city culinary engine with Gradio and FastAPI
Browse files383 unmodified lines38438538638738838939040 unmodified lines431432433434435436437438439440383 unmodified linesreturn replywith gr.Blocks(title="Palate — Spatial Culinary Copilot", theme=gr.themes.Base()) as demo:gr.Markdown("# 🍽️ Palate / TasteOS — Spatial Culinary Copilot\n""**Zero Paid Placements · Zero Fake Reviews · 82,000+ Ground-Truth Kitchens**\n\n"40 unmodified linesif __name__ == "__main__":import uvicornport = int(os.environ.get("PORT", 7860))print(f"==================================================")print(f" Palate Global Multi-City Engine listening on {port}")print(f" Web Application Root: http://0.0.0.0:{port}/")print(f" Gradio Copilot Portal: http://0.0.0.0:{port}/gradio")print(f"==================================================")uvicorn.run(app, host="0.0.0.0", port=port)383 unmodified lines38438538638738838939040 unmodified lines431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464383 unmodified linesreturn replywith gr.Blocks(title="Palate — Spatial Culinary Copilot") as demo:gr.Markdown("# 🍽️ Palate / TasteOS — Spatial Culinary Copilot\n""**Zero Paid Placements · Zero Fake Reviews · 82,000+ Ground-Truth Kitchens**\n\n"40 unmodified linesif __name__ == "__main__":import uvicornimport socketimport subprocessport_env = os.environ.get("PORT")gradio_port_env = os.environ.get("GRADIO_SERVER_PORT")print(f"=== NETWORK & PROCESS DIAGNOSTICS ===")print(f"PORT env: {port_env}")print(f"GRADIO_SERVER_PORT env: {gradio_port_env}")print(f"Platform: {sys.platform}")try:ps_out = subprocess.check_output(["ps", "aux"], text=True)print(f"Processes:\n{ps_out}")except Exception as e:print(f"ps aux check error: {e}")try:sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)res = sock.connect_ex(('127.0.0.1', 7860))sock.close()print(f"Socket probe 127.0.0.1:7860 -> result: {res} (0=occupied, non-zero=free)")except Exception as e:print(f"Socket probe error: {e}")target_port = int(port_env or gradio_port_env or 7860)print(f"==================================================")print(f" Palate Global Multi-City Engine listening on {target_port}")print(f" Web Application Root: http://0.0.0.0:{target_port}/")print(f" Gradio Copilot Portal: http://0.0.0.0:{target_port}/gradio")print(f"==================================================")uvicorn.run(app, host="0.0.0.0", port=target_port)
app.py+30-6