Gradio can't change height with the screen
I use all methods to try to let the output box fit the height of screen, but it does not work. Does anyone know how to fix the problem? Thank you so muchcss = “”".gradio-output {height: 100% !important;  # 設定訊息框的高度width: 100% !importantoverflow-y: hidden;text-rendering: optimizeLegibility;flex-grow: 1 !important;overflow: auto !important;#col{ height: calc(100vh - 112px - 16px) !important; }}“”"theme=gr.themes.Default(primary_hue=gr.themes.colors.red, secondary_hue=gr.themes.colors.pink,font=[gr.themes.GoogleFont(“LXGW WenKai Mono TC”)]).set(body_background_fill=‘#FFF5EE’)with gr.Blocks(theme=theme,css=css) as demo:with gr.Row():with gr.Column(elem_id=“col”):gr.HTML(“”".gradio-output{height: 100% !important;  # 設定訊息框的高度width: 100% !importanttext-rendering: optimizeLegibility;  # 啟用抗鋸齒渲染}“”")gr.ChatInterface(main_pipeline,type=“messages”,css=css,fill_height=True)
2024-12-22T01:30:25Z
This might a help.# with gr.Blocks(theme=theme,css=css) as demo:
with gr.Blocks(theme=theme,css=css,fill_height=True) as demo:
2024-12-22T12:55:31Z
John6666:fill_height=Truethank you but it did not work.qq
2024-12-22T12:59:22Z
The only other thing I can think of is this, but it’s True by default…If you ask in the Gradio community on HF Discord, you’ll probably be able to find out something, as the developers are usually there.huggingface.coSpaces Configuration ReferenceWe’re on a journey to advance and democratize artificial intelligence through open source and open science.fullWidth:booleanWhether your Space is rendered inside a full-width (whentrue) or fixed-width column (ie. “container” CSS) inside the iframe. Defaults totrue.header:stringCan be eitherminiordefault. Ifheaderis set tominithe space will be displayed full-screen with a mini floating header .