Spaces:
Runtime error
Runtime error
paul hilders
commited on
Commit
·
bc2b854
1
Parent(s):
c3ca2bd
Fix bug
Browse files
app.py
CHANGED
@@ -82,7 +82,7 @@ def add_label_to_img(img):
|
|
82 |
img = ImageOps.expand(img, border=10, fill=(255,255,255))
|
83 |
draw = ImageDraw.Draw(img)
|
84 |
font = ImageFont.truetype("FONTS/arial.ttf", 36)
|
85 |
-
draw.text((0,0),"Sample Text",(0,255,255)
|
86 |
|
87 |
return img
|
88 |
|
@@ -96,8 +96,6 @@ def NER_demo(image, text):
|
|
96 |
highlighed_entities.append((ent_text, ent_label))
|
97 |
|
98 |
# As the default image, we run the default demo on the input image and text:
|
99 |
-
font = ImageFont.truetype("FONTS/arial.ttf", 36)
|
100 |
-
|
101 |
overlapped, highlighted_text = run_demo(image, text)
|
102 |
|
103 |
# Then, we run the demo for each of the named entities:
|
|
|
82 |
img = ImageOps.expand(img, border=10, fill=(255,255,255))
|
83 |
draw = ImageDraw.Draw(img)
|
84 |
font = ImageFont.truetype("FONTS/arial.ttf", 36)
|
85 |
+
draw.text((0,0),"Sample Text",(0,255,255))
|
86 |
|
87 |
return img
|
88 |
|
|
|
96 |
highlighed_entities.append((ent_text, ent_label))
|
97 |
|
98 |
# As the default image, we run the default demo on the input image and text:
|
|
|
|
|
99 |
overlapped, highlighted_text = run_demo(image, text)
|
100 |
|
101 |
# Then, we run the demo for each of the named entities:
|