Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ models = {
|
|
| 7 |
"sentiment": {"model": "cardiffnlp/twitter-roberta-base-sentiment-latest", "task": "sentiment-analysis"},
|
| 8 |
"dialogue": {"model": "microsoft/DialoGPT-medium", "task": "text-generation"},
|
| 9 |
"summarizer": {"model": "sshleifer/distilbart-cnn-12-6", "task": "summarization"},
|
| 10 |
-
"ner": {"model": "
|
| 11 |
}
|
| 12 |
|
| 13 |
# Initialize pipelines
|
|
@@ -77,7 +77,7 @@ with gr.Blocks() as demo:
|
|
| 77 |
sum_btn.click(summarize_text, [sum_text, sum_max, sum_min], sum_out)
|
| 78 |
|
| 79 |
with gr.Tab("Named Entity Recognition"):
|
| 80 |
-
gr.Markdown("## Named Entity Recognition (
|
| 81 |
ner_text = gr.Textbox(lines=3, label="Text")
|
| 82 |
ner_btn = gr.Button()
|
| 83 |
ner_out = gr.Textbox(lines=5, label="Entities")
|
|
|
|
| 7 |
"sentiment": {"model": "cardiffnlp/twitter-roberta-base-sentiment-latest", "task": "sentiment-analysis"},
|
| 8 |
"dialogue": {"model": "microsoft/DialoGPT-medium", "task": "text-generation"},
|
| 9 |
"summarizer": {"model": "sshleifer/distilbart-cnn-12-6", "task": "summarization"},
|
| 10 |
+
"ner": {"model": "dslim/bert-base-NER", "task": "ner"},
|
| 11 |
}
|
| 12 |
|
| 13 |
# Initialize pipelines
|
|
|
|
| 77 |
sum_btn.click(summarize_text, [sum_text, sum_max, sum_min], sum_out)
|
| 78 |
|
| 79 |
with gr.Tab("Named Entity Recognition"):
|
| 80 |
+
gr.Markdown("## Named Entity Recognition (dslim/bert-base-NER)")
|
| 81 |
ner_text = gr.Textbox(lines=3, label="Text")
|
| 82 |
ner_btn = gr.Button()
|
| 83 |
ner_out = gr.Textbox(lines=5, label="Entities")
|