Spaces:
Running
Update app.py
Browse filesTo make the title bigger, we just need to change the font-size inside your HTML header block. I've bumped the main title up to 28px (from 20px) and slightly increased the subtitle beneath it to 14px so it balances out.
Scroll down to right after the with gr.Blocks(...) as demo: line (around line 249 in your original file) and replace your current Header Panel [Marker 1] block with this:
Gemini is always way off on line numbers. The comment is on line 359
I want the entire input box label to be visible.
Maybe I should just add extra spaces at the end of the short labels?
That is a very logical idea, but unfortunately, adding extra spaces will not work. Web browsers automatically compress multiple blank spaces into a single space when rendering HTML, so hitting the spacebar a dozen times at the end of "Ch." won't actually stretch the box out.
I completely understand wanting to read the full "๐ Hebrew Verses Input String" title. My previous fix sacrificed readability for alignment by cutting the text off.
We can achieve both perfect alignment and full visibility by taking the opposite approach: instead of shrinking the long title down to one line, we will force the short titles to take up exactly two lines of vertical space. By anchoring the text to the bottom of that space, the short titles will hug the input boxes perfectly, and the long title will have enough room to wrap naturally.
The CSS Update
Scroll back up to your custom_css block. Find the exact snippet we added at the very end in the previous step, highlight it, and replace it entirely with this new block:
(added at line 134)
/* Allow full text but force all labels to a uniform two-line height */
.gradio-container label span {
white-space: normal !important; /* Allows long text to wrap to a second line */
display: flex !important;
align-items: flex-end !important; /* Pushes short titles to the bottom flush with the box */
min-height: 42px !important; /* Creates enough vertical space for two lines of text */
}
130 unmodified lines131132133134135136219 unmodified lines356357358359360361362363364365366130 unmodified lines}"""219 unmodified lines"""with gr.Blocks(title="Shorashim Pro Interlinear Workspace") as demo:# Header Panel [Marker 1]gr.HTML("<div style='background: linear-gradient(135deg, #111827 0%, #0b0f19 100%); padding: 10px; border-radius: 6px; margin-bottom: 10px; text-align: center; border: 1px solid #d4af37;'>""<h1 style='margin: 0 0 2px 0; font-size: 20px; font-weight: 700; color: #d4af37;'>๐ Shorashim Pro Workspace</h1>""<p style='margin: 0; font-size: 12px; color: #9ca3af;'>Convert raw Hebrew text strings into BEI style interlinear tables</p>""</div>")130 unmodified lines131132133134135136137138139140141142143219 unmodified lines363364365366367368369370371372373130 unmodified lines}/* Allow full text but force all labels to a uniform two-line height */.gradio-container label span {white-space: normal !important;display: flex !important;align-items: flex-end !important;min-height: 42px !important;}"""219 unmodified lines"""with gr.Blocks(title="Shorashim Pro Interlinear Workspace") as demo:# Header Panel [Marker 1]gr.HTML("<div style='background: linear-gradient(135deg, #111827 0%, #0b0f19 100%); padding: 10px; border-radius: 6px; margin-bottom: 10px; text-align: center; border: 1px solid #d4af37;'>""<h1 style='margin: 0 0 2px 0; font-size: 28px; font-weight: 700; color: #d4af37;'>๐ Shorashim Pro Workspace</h1>""<p style='margin: 0; font-size: 14px; color: #9ca3af;'>Convert raw Hebrew text strings into BEI style interlinear tables</p>""</div>")