You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A common request is to increase the width of Gradio apps so that there's more space for the components and less white space around the edges of the app. While this can be done with custom css, it'd be good to have a built-in parameter in Gradio for this:
This is particularly relevant for arena-type demos, where multiple (>= two) chatbots are present in the UI, allowing for easy comparisons. These types of demos have become quite popular recently, with the success of lmsys-arena, and I think we might see an increase in their numbers in the near future. For example: https://huggingface.co/spaces/WildVision/vision-arena
The text was updated successfully, but these errors were encountered:
In case it's useful to anyone trying to do this, the code I'm currently using make things full width for Blocks is similar to this:
importgradioasgr# Change the @media query to whatever min-width you needhead_style="""<style>@media (min-width: 1536px){ .gradio-container { min-width: var(--size-full) !important; }}</style>"""# It has to go in head=withgr.Blocks(
title="A chat interface",
head=head_style,
) aschat_interface:
# ...etc.
Note that it has to go in head, as putting it in CSS didn't work on the version of gradio I was working with at the time I was trying to do this, at least with the @media query.
A common request is to increase the width of Gradio apps so that there's more space for the components and less white space around the edges of the app. While this can be done with custom css, it'd be good to have a built-in parameter in Gradio for this:
Quoting @yvrjsharma:
The text was updated successfully, but these errors were encountered: