Update app.py
Browse files
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.
|
| 95 |
-
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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(
|