Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,7 +53,7 @@ with gr.Blocks(title="Textile Machinery NER Demo") as demo:
|
|
| 53 |
gr.Markdown(
|
| 54 |
"""
|
| 55 |
# Textile Machinery Entity Recognition Demo
|
| 56 |
-
This demo selects a random text snippet from
|
| 57 |
"""
|
| 58 |
)
|
| 59 |
|
|
@@ -64,7 +64,8 @@ with gr.Blocks(title="Textile Machinery NER Demo") as demo:
|
|
| 64 |
lines=5
|
| 65 |
)
|
| 66 |
|
| 67 |
-
|
|
|
|
| 68 |
output_entities = gr.JSON(label="Entities")
|
| 69 |
|
| 70 |
submit_btn = gr.Button("Find Textile Machinery!")
|
|
|
|
| 53 |
gr.Markdown(
|
| 54 |
"""
|
| 55 |
# Textile Machinery Entity Recognition Demo
|
| 56 |
+
This demo selects a random text snippet from the Science Museum's 1921 catalogue and identifies "Textile Machinery" entities using a fine-tuned GLiNER model developed by the Congruence Engine project.
|
| 57 |
"""
|
| 58 |
)
|
| 59 |
|
|
|
|
| 64 |
lines=5
|
| 65 |
)
|
| 66 |
|
| 67 |
+
# Use HighlightedText to show the entities
|
| 68 |
+
output_highlighted = gr.HighlightedText(label="Predicted Entities")
|
| 69 |
output_entities = gr.JSON(label="Entities")
|
| 70 |
|
| 71 |
submit_btn = gr.Button("Find Textile Machinery!")
|