import os import gradio as gr from main import app with gr.Blocks(title="HumRes API") as demo: gr.Markdown("# 🚀 HumRes API Server") gr.Markdown("FastAPI Backend is running successfully.") # Mount FastAPI app onto Gradio app_ui = gr.mount_gradio_app(app, demo, path="/") if __name__ == "__main__": import uvicorn port = int(os.environ.get("PORT", 7860)) uvicorn.run(app, host="0.0.0.0", port=port)