Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -763,11 +763,10 @@ def create_interface():
|
|
| 763 |
6. **π Click "Analyse Text"** to see results with organized output
|
| 764 |
(Common/custom entities which overlap are shown with split-colour highlighting)
|
| 765 |
""")
|
| 766 |
-
|
| 767 |
# Add tip box
|
| 768 |
gr.HTML("""
|
| 769 |
<div style="background-color: #fff3cd; border: 1px solid #ffeaa7; border-radius: 8px; padding: 12px; margin: 15px 0;">
|
| 770 |
-
<strong style="color: #856404;">π‘ Top tip:</strong>
|
| 771 |
</div>
|
| 772 |
""")
|
| 773 |
|
|
@@ -828,10 +827,10 @@ def create_interface():
|
|
| 828 |
)
|
| 829 |
|
| 830 |
with gr.Column():
|
| 831 |
-
gr.Markdown("### β¨ Custom Entity Types
|
| 832 |
custom_entities = gr.Textbox(
|
| 833 |
label="Custom Entities (comma-separated)",
|
| 834 |
-
placeholder="e.g. relationships, occupations,
|
| 835 |
lines=3
|
| 836 |
)
|
| 837 |
gr.Markdown("""
|
|
@@ -839,9 +838,9 @@ def create_interface():
|
|
| 839 |
- relationships, occupations, skills
|
| 840 |
- emotions, actions, objects
|
| 841 |
- medical conditions, treatments
|
| 842 |
-
- financial terms, business roles
|
| 843 |
|
| 844 |
-
|
|
|
|
| 845 |
""")
|
| 846 |
|
| 847 |
# Add glossary here (Option 1: below selection box but above analyse button)
|
|
|
|
| 763 |
6. **π Click "Analyse Text"** to see results with organized output
|
| 764 |
(Common/custom entities which overlap are shown with split-colour highlighting)
|
| 765 |
""")
|
|
|
|
| 766 |
# Add tip box
|
| 767 |
gr.HTML("""
|
| 768 |
<div style="background-color: #fff3cd; border: 1px solid #ffeaa7; border-radius: 8px; padding: 12px; margin: 15px 0;">
|
| 769 |
+
<strong style="color: #856404;">π‘ Top tip:</strong> No model is perfect - all can miss and/or incorrectly identify entity types.
|
| 770 |
</div>
|
| 771 |
""")
|
| 772 |
|
|
|
|
| 827 |
)
|
| 828 |
|
| 829 |
with gr.Column():
|
| 830 |
+
gr.Markdown("### β¨ Custom Entity Types - Powered by GLiNER)")
|
| 831 |
custom_entities = gr.Textbox(
|
| 832 |
label="Custom Entities (comma-separated)",
|
| 833 |
+
placeholder="e.g. relationships, civilian occupations, emotions",
|
| 834 |
lines=3
|
| 835 |
)
|
| 836 |
gr.Markdown("""
|
|
|
|
| 838 |
- relationships, occupations, skills
|
| 839 |
- emotions, actions, objects
|
| 840 |
- medical conditions, treatments
|
|
|
|
| 841 |
|
| 842 |
+
|
| 843 |
+
|
| 844 |
""")
|
| 845 |
|
| 846 |
# Add glossary here (Option 1: below selection box but above analyse button)
|