zoo3d / app.py
drozdgk's picture
fix: disable gradio api_info to avoid gradio_client schema crash
e7e26ca
raw
history blame
492 Bytes
import os
import gradio as gr
def _launch():
# HF Spaces expects the app to listen on 0.0.0.0:7860 (PORT may be provided).
import mvp
port = int(os.getenv("PORT", "7860"))
# `mvp` defines `demo` (gr.Blocks). We launch it here instead of inside `mvp.py`.
mvp.demo.queue(max_size=20).launch(
server_name="0.0.0.0",
server_port=port,
show_error=True,
share=False,
show_api=False,
)
if __name__ == "__main__":
_launch()