Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update: Layout
Browse files
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 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
|
|
|
| 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])
|