panelforge commited on
Commit
44f2016
·
verified ·
1 Parent(s): d83e2ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -4
app.py CHANGED
@@ -86,6 +86,7 @@ css = """
86
  display: inline-block;
87
  padding-right: 20px;
88
  padding-left: 20px;
 
89
  }
90
 
91
  #right-column {
@@ -104,6 +105,22 @@ css = """
104
  margin-top: 10px;
105
  display: block;
106
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  """
108
 
109
  with gr.Blocks(css=css) as demo:
@@ -113,10 +130,10 @@ with gr.Blocks(css=css) as demo:
113
  gr.Markdown("""# Text-to-Image Gradio Template""")
114
 
115
  # Display result image at the top
116
- result = gr.Image(label="Result", show_label=False)
117
 
118
  # Add a textbox to display the prompts used for generation
119
- prompt_info = gr.Textbox(label="Prompts Used", lines=3, interactive=False)
120
 
121
  # Advanced Settings and Run Button
122
  with gr.Accordion("Advanced Settings", open=False):
@@ -175,8 +192,7 @@ with gr.Blocks(css=css) as demo:
175
  run_button = gr.Button("Run", elem_id="run-button")
176
 
177
  with gr.Column(elem_id="right-column"):
178
- gr.Markdown("### Prompt / Tag Input")
179
-
180
  # State to track active tab
181
  active_tab = gr.State("Prompt Input")
182
 
@@ -189,6 +205,7 @@ with gr.Blocks(css=css) as demo:
189
  max_lines=1,
190
  placeholder="Enter your prompt",
191
  container=False,
 
192
  )
193
  prompt_tab.select(lambda: "Prompt Input", inputs=None, outputs=active_tab)
194
 
 
86
  display: inline-block;
87
  padding-right: 20px;
88
  padding-left: 20px;
89
+ vertical-align: top;
90
  }
91
 
92
  #right-column {
 
105
  margin-top: 10px;
106
  display: block;
107
  }
108
+
109
+ #prompt-info {
110
+ margin-bottom: 20px;
111
+ }
112
+
113
+ #result {
114
+ margin-bottom: 20px;
115
+ }
116
+
117
+ .gradio-tabs > .tab-item {
118
+ margin-bottom: 20px;
119
+ }
120
+
121
+ #prompt {
122
+ margin-bottom: 20px;
123
+ }
124
  """
125
 
126
  with gr.Blocks(css=css) as demo:
 
130
  gr.Markdown("""# Text-to-Image Gradio Template""")
131
 
132
  # Display result image at the top
133
+ result = gr.Image(label="Result", show_label=False, elem_id="result")
134
 
135
  # Add a textbox to display the prompts used for generation
136
+ prompt_info = gr.Textbox(label="Prompts Used", lines=3, interactive=False, elem_id="prompt-info")
137
 
138
  # Advanced Settings and Run Button
139
  with gr.Accordion("Advanced Settings", open=False):
 
192
  run_button = gr.Button("Run", elem_id="run-button")
193
 
194
  with gr.Column(elem_id="right-column"):
195
+ # Removed the Prompt / Tag Input title here
 
196
  # State to track active tab
197
  active_tab = gr.State("Prompt Input")
198
 
 
205
  max_lines=1,
206
  placeholder="Enter your prompt",
207
  container=False,
208
+ elem_id="prompt"
209
  )
210
  prompt_tab.select(lambda: "Prompt Input", inputs=None, outputs=active_tab)
211