Spaces:
Running on CPU Upgrade

ziem-io commited on
Commit
c50c843
·
1 Parent(s): 2954446

Update: Layout

Browse files
Files changed (1) hide show
  1. app.py +15 -14
app.py CHANGED
@@ -174,20 +174,21 @@ def replace_text():
174
  with gr.Blocks() as demo:
175
  gr.Markdown("## Submit Whisky Review for Classification")
176
 
177
- review_box = gr.Textbox(
178
- label="Whisky Review",
179
- lines=8,
180
- placeholder="Enter whisky review",
181
- value=EXAMPLES[0],
182
- )
183
-
184
- # Buttons nebeneinander unter der Textbox
185
- with gr.Row():
186
- replace_btn = gr.Button("🔄 Replace Example", variant="secondary", scale=2)
187
- submit_btn = gr.Button("Submit", variant="primary", scale=2)
188
-
189
- html_out = gr.HTML(label="Table")
190
- json_out = gr.JSON(label="JSON")
 
191
 
192
  # Events
193
  submit_btn.click(predict, inputs=review_box, outputs=[html_out, json_out])
 
174
  with gr.Blocks() as demo:
175
  gr.Markdown("## Submit Whisky Review for Classification")
176
 
177
+ with gr.Row(): # alles nebeneinander
178
+ with gr.Column(scale=1): # linke Seite: Input
179
+ review_box = gr.Textbox(
180
+ label="Whisky Review",
181
+ lines=8,
182
+ placeholder="Enter whisky review",
183
+ value=EXAMPLES[0],
184
+ )
185
+ with gr.Row():
186
+ replace_btn = gr.Button("Replace Example", variant="secondary", scale=1)
187
+ submit_btn = gr.Button("Submit", variant="primary", scale=1)
188
+
189
+ with gr.Column(scale=1): # rechte Seite: Output
190
+ html_out = gr.HTML(label="Table")
191
+ json_out = gr.JSON(label="JSON")
192
 
193
  # Events
194
  submit_btn.click(predict, inputs=review_box, outputs=[html_out, json_out])