Spaces:
Sleeping
Sleeping
Commit
Β·
95888be
1
Parent(s):
c75d824
adjust layout
Browse files
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.
|
| 49 |
-
text_in = gr.Textbox(lines=1, placeholder="Insert text here", label="Input Sentence")
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 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 |
"""
|