Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,18 +17,18 @@ def get_ner(text):
|
|
17 |
|
18 |
demo = gr.Blocks()
|
19 |
with demo:
|
20 |
-
gr.Markdown("Try out
|
21 |
with gr.Tab("Text Summarizer"):
|
22 |
-
sum_input = gr.Textbox(placeholder="Enter text to summarize...", lines=4)
|
23 |
-
sum_output = gr.Textbox()
|
24 |
-
sum_btn = gr.Button("Summarize")
|
25 |
sum_btn.click(get_summary, sum_input, sum_output)
|
26 |
with gr.Tab("Named Entity Recognition"):
|
27 |
-
ner_input = gr.Textbox(placeholder = "Enter text...", lines = 4)
|
28 |
# ner_output = gr.Textbox()
|
29 |
ner_output = [gr.HighlightedText(label="Text with entities")]
|
30 |
allow_flagging = "never"
|
31 |
-
ner_btn = gr.Button("
|
32 |
ner_btn.click(get_ner, ner_input, ner_output)
|
33 |
|
34 |
|
|
|
17 |
|
18 |
demo = gr.Blocks()
|
19 |
with demo:
|
20 |
+
gr.Markdown("# Try out some cool tasks!")
|
21 |
with gr.Tab("Text Summarizer"):
|
22 |
+
sum_input = [gr.Textbox(label="Text to Summarize", placeholder="Enter text to summarize...", lines=4)]
|
23 |
+
sum_output = [gr.Textbox(label="Summarized Text")]
|
24 |
+
sum_btn = gr.Button("Summarize text")
|
25 |
sum_btn.click(get_summary, sum_input, sum_output)
|
26 |
with gr.Tab("Named Entity Recognition"):
|
27 |
+
ner_input = [gr.Textbox(label="Text to find Entities", placeholder = "Enter text...", lines = 4)]
|
28 |
# ner_output = gr.Textbox()
|
29 |
ner_output = [gr.HighlightedText(label="Text with entities")]
|
30 |
allow_flagging = "never"
|
31 |
+
ner_btn = gr.Button("Generate entities")
|
32 |
ner_btn.click(get_ner, ner_input, ner_output)
|
33 |
|
34 |
|