Spaces:
Running
Running
Updated app.py to start with very short examples.
Browse files
app.py
CHANGED
@@ -12,15 +12,14 @@ def predict(text):
|
|
12 |
|
13 |
# Define interface
|
14 |
iface = gr.Interface(fn=predict,
|
15 |
-
inputs=gr.inputs.Textbox(lines=10, label="Text"),
|
16 |
-
outputs="
|
17 |
title="Text Classification",
|
18 |
description="Classify text as other[0], healthcare[1], or technology[2]",
|
19 |
examples=[
|
20 |
-
'
|
21 |
-
'
|
22 |
-
'
|
23 |
-
'The success of Hudson’s Bay Co Executive Chairman Richard Baker’s $1.3 billion bid to take the department store operator private hinges on whether an independent valuator will view the company more as a retailer and less as a real estate owner, corporate governance experts and analysts said.'],
|
24 |
allow_flagging='never'
|
25 |
)
|
26 |
|
|
|
12 |
|
13 |
# Define interface
|
14 |
iface = gr.Interface(fn=predict,
|
15 |
+
inputs=gr.inputs.Textbox(lines=10, label="Input Text"),
|
16 |
+
outputs="Text Classification Results: {other[0], healthcare[1], technology[2]}",
|
17 |
title="Text Classification",
|
18 |
description="Classify text as other[0], healthcare[1], or technology[2]",
|
19 |
examples=[
|
20 |
+
['This is a text about healthcare'],
|
21 |
+
['This is a text about technology'],
|
22 |
+
['This is a text about other']],
|
|
|
23 |
allow_flagging='never'
|
24 |
)
|
25 |
|