simonschoe commited on
Commit
95888be
β€’
1 Parent(s): c75d824

adjust layout

Browse files
Files changed (1) hide show
  1. app.py +19 -20
app.py CHANGED
@@ -44,26 +44,25 @@ with app:
44
 
45
  with gr.Tabs() as tabs:
46
  with gr.TabItem("πŸ” Model", id=0):
47
- with gr.Row():
48
- with gr.Column():
49
- text_in = gr.Textbox(lines=1, placeholder="Insert text here", label="Input Sentence")
50
- with gr.Row():
51
- compute_bt = gr.Button("Classify")
52
- score_out = gr.Number(label="Score", interactive=False)
53
- html_out = gr.HTML(label="Explanation")
54
- gr.Examples(
55
- examples=[
56
- ["If we look at the plans for 2018, it is to introduce 650 new products, which is an absolute all- time high."],
57
- ["We have been doing kind of an integrated campaign, so it's TV, online, we do the Google Ad Words - all those different elements together."],
58
- ["So that turned out to be beneficial for us, and I think, we'll just see how the market and interest rates move over the course of the year,"]
59
- ],
60
- label="Examples (click to start detection)",
61
- inputs=[text_in],
62
- outputs=[score_out, html_out],
63
- fn=classify,
64
- run_on_click=True,
65
- cache_examples=False
66
- )
67
  with gr.TabItem("πŸ“ Usage", id=1):
68
  gr.Markdown(
69
  """
 
44
 
45
  with gr.Tabs() as tabs:
46
  with gr.TabItem("πŸ” Model", id=0):
47
+ #with gr.Row():
48
+ with gr.Row():
49
+ text_in = gr.Textbox(lines=1, placeholder="Insert text here", label="Input Sentence", scale=5)
50
+ compute_bt = gr.Button("Classify", scale=1)
51
+ html_out = gr.HTML(label="Explanation", scale=5)
52
+ score_out = gr.Number(label="Score", value=float("NaN"), interactive=False, scale=1)
53
+ gr.Examples(
54
+ examples=[
55
+ ["If we look at the plans for 2018, it is to introduce 650 new products, which is an absolute all- time high."],
56
+ ["We have been doing kind of an integrated campaign, so it's TV, online, we do the Google Ad Words - all those different elements together."],
57
+ ["So that turned out to be beneficial for us, and I think, we'll just see how the market and interest rates move over the course of the year,"]
58
+ ],
59
+ label="Examples (click to start detection)",
60
+ inputs=[text_in],
61
+ outputs=[score_out, html_out],
62
+ fn=classify,
63
+ run_on_click=True,
64
+ cache_examples=False
65
+ )
 
66
  with gr.TabItem("πŸ“ Usage", id=1):
67
  gr.Markdown(
68
  """