boomcheng commited on
Commit
3edb685
·
verified ·
1 Parent(s): a648595

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -91,9 +91,18 @@ with gr.Blocks() as demo:
91
  gr.Markdown("# Text-to-Image Generator with Object Addition")
92
 
93
  # Put prompt and submit button in the same row
94
- with gr.Row():
95
- prompt = gr.Textbox(label="Prompt", placeholder="Enter your prompt here")
96
- submit_button = gr.Button("Submit Prompt")
 
 
 
 
 
 
 
 
 
97
 
98
  # Always visible DataFrame
99
  objects_display = gr.Dataframe(
 
91
  gr.Markdown("# Text-to-Image Generator with Object Addition")
92
 
93
  # Put prompt and submit button in the same row
94
+ with gr.Group():
95
+ with gr.Row():
96
+ # Replace gr.Textbox with gr.Text for a single-line input field
97
+ prompt = gr.Text(
98
+ label="Prompt", # Label for the input field
99
+ show_label=False, # Hide the label
100
+ max_lines=1, # Single-line input
101
+ placeholder="Enter your prompt here", # Placeholder text
102
+ container=False # Remove the container background
103
+ )
104
+ # Replace the button with the simplified "Run" button
105
+ submit_button = gr.Button("Submit Prompt", scale=0) # Add scale for button size
106
 
107
  # Always visible DataFrame
108
  objects_display = gr.Dataframe(