Skip to content

Commit bdb2131

Browse files
committed
Set min lines to 2 in Gradio text boxes
Without this setting the text boxes are only 1 line high and overflow creates a scrollbar in the box rather than the box expanding in size like it used to in previous Gradio versions.
1 parent 8eba191 commit bdb2131

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

web-apps/image-analysis/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ def analyze_image(image_url, prompt):
111111
app = gr.Interface(
112112
fn=analyze_image,
113113
inputs=[
114-
gr.Textbox(label="Image URL"),
115-
gr.Textbox(label="Prompt/Question", elem_id="prompt", scale=2),
114+
gr.Textbox(label="Image URL", lines=2),
115+
gr.Textbox(label="Prompt/Question", elem_id="prompt", scale=2, lines=2),
116116
],
117-
outputs=[gr.Image(label="Image"), gr.Textbox(label="Results")],
117+
outputs=[gr.Image(label="Image"), gr.Textbox(label="Results", lines=2)],
118118
flagging_mode='never',
119119
title=settings.page_title,
120120
description=settings.page_description,

0 commit comments

Comments
 (0)