Spaces:
Sleeping
Sleeping
cindyangelira
commited on
Commit
·
42e9974
1
Parent(s):
70fdd9a
feat: gradio app
Browse files
README.md
CHANGED
@@ -9,4 +9,8 @@ app_file: app.py
|
|
9 |
pinned: false
|
10 |
---
|
11 |
|
|
|
|
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
9 |
pinned: false
|
10 |
---
|
11 |
|
12 |
+
# Simple Name Entity Recognition (NER) App using Gradio.
|
13 |
+
|
14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
15 |
+
|
16 |
+
Check this space on [Hugging Face](https://huggingface.co/spaces/cindyangelira/ner-bahasa-indonesia).
|
app.py
CHANGED
@@ -5,7 +5,7 @@ from spacy import displacy
|
|
5 |
import torch
|
6 |
|
7 |
@spaces.GPU
|
8 |
-
def dummy(): # just a dummy
|
9 |
pass
|
10 |
|
11 |
# load model pipeline globally
|
@@ -19,7 +19,7 @@ except Exception as e:
|
|
19 |
print(f"Error loading model: {e}")
|
20 |
raise
|
21 |
|
22 |
-
#
|
23 |
ENTITY_COLORS = {
|
24 |
"O": "#ffffff", # White for 'O'
|
25 |
"PER": "#ffadad", # Light red for 'PERSON'
|
|
|
5 |
import torch
|
6 |
|
7 |
@spaces.GPU
|
8 |
+
def dummy(): # just a dummy to enable the zeroSpace
|
9 |
pass
|
10 |
|
11 |
# load model pipeline globally
|
|
|
19 |
print(f"Error loading model: {e}")
|
20 |
raise
|
21 |
|
22 |
+
# define colors for each tag
|
23 |
ENTITY_COLORS = {
|
24 |
"O": "#ffffff", # White for 'O'
|
25 |
"PER": "#ffadad", # Light red for 'PERSON'
|