with gr.Row():

#4
by prithivMLmods - opened
  • Add the Model and LoRA Dropdowns as a new row[with gr.Row():], making it easier to switch between them
    @John6666

Thank you for pointing this out.
I started out making this for smartphones, so the UI I make is generally not very well set up for Row. Even though I use a PC to create them.
Is it something like this?

@John6666 I believe something went wrong πŸ˜…
Screenshot_2024-08-30-07-39-14-552_com.android.chrome.png

Owner
β€’
edited Aug 30

What environment?
Firefox and Chrome on my Windows PC, it's not beautiful, but it won't be anyway...
Well, it must be a CSS mistake.

Come on! Who did it?

css = """
#container {  margin: 0 auto; !important; }
#col-container { margin: 0 auto; !important; }
#result { display: inline-block; max-width: 520px; max-height: 520px; width: 520px; height: 520px; align: center; margin: 0px auto; !important; }
.lora { display: inline-block; min-width: 480px; !important; }
#model-info { text-align: center; !important; }
"""

Android, chrome latest version

If I kill them all, the killer would have died as a result.
So, I did the suspicious inline-block for the time being.

πŸ€”
Screenshot_2024-08-30-07-54-05-333_com.android.chrome.png

It's a lice search. Primitive, but fast. Here's what I'm doing.

css = """
#container { margin: 0 auto; !important; }
#col-container { margin: 0 auto; !important; }
#result { max-width: 520px; max-height: 520px; margin: 0px auto; !important; }
.lora { min-width: 480px; !important; }
#model-info { text-align: center; !important; }
"""

Looks Good to me, The problem is fixed!

So if we use display: inline-block; or display: block; on Gradio, UI would be broken.
But there's a lot of CSS that doesn't work on Gradio if you don't use it, so this is a technique that's sometimes recommended... how scary!πŸ™€

Surely there should be a fix display: inline-block; and display: block; somewhere!
I also hate that a lot of css doesn't work on gradio, but that's just your typical gradio not not working as intended and the syntax changes every other update. πŸ˜†

Oh, yes. CSS is trivial compared to syntax changes...
The AI community is not only full of programmers and geeks, but also academics, so the maintenance of libraries stopped a long time ago when the papers were finished, and compatibility is often necessary...

Still, you'd be surprised to know why some of the Gradios in my space are not up to version 4.42.0.
Maybe it's compatibility with Miku or Nymbo themes, I don't know what it is, but all the elements have scrollbars.🀯

Yeah, I don't even like keeping up with the latest gradio versions since it's a nightmare to migrate the syntax from one version to another (especially if the latest one presents breaking changes).
I also noticed that some of your spaces are not up to date with the latest, can't blame you! πŸ˜†

Owner
β€’
edited Aug 30

I mean, if this is not fixed in 4.43.0 or later, I'll have to fix the Miku theme side...
Not because I'm a fan of Hatsune Miku or anything (although I don't dislike her or her voice actor), but many people use the theme just because easy to look at on both dark/light themes.

The day there's even a forced update, all the Miku theme Spaces in the HF space will all be covered in scrollbars...
I'm about 70% sure Gradio's developers will notice and fix it earlier.πŸ™„

I think fixing the Miku theme itself would be the best way at this point.
Surely the gradio devs will notice and fix it.. surely.

4.42.0

https://huggingface.co/spaces/John6666/Nymbo_Theme

4.36.1

https://huggingface.co/spaces/Nymbo/Nymbo_Theme

Good news, the Miku theme was my mistake and it was the Nymbo theme that is buggy in 4.42.0.
There will be less damage yet. (If the other themes are okay...)

Also, that's not a scrollbar. Anyway, I'll go report it.

Sign up or log in to comment