import gradio as gr css = """ html, body, #root { width: 100% !important; height: 100% !important; margin: 0 !important; padding: 0 !important; overflow-x: hidden !important; overflow-y: auto !important; } * { max-width: 100% !important; box-sizing: border-box !important; } img, svg, canvas, iframe { max-width: 100% !important; height: auto !important; } @media (max-width: 768px) { html { font-size: 14px !important; } button, input, select, textarea { font-size: 14px !important; } } """ with gr.Blocks(css=css) as demo: # Your UI here pass demo.launch()