ydshieh
commited on
Commit
·
f0c57f7
1
Parent(s):
3eaff3e
Update
Browse files
app.py
CHANGED
|
@@ -91,7 +91,7 @@ colors = [
|
|
| 91 |
(0, 64, 128),
|
| 92 |
]
|
| 93 |
|
| 94 |
-
color_map = {f"
|
| 95 |
|
| 96 |
|
| 97 |
def is_overlapping(rect1, rect2):
|
|
@@ -270,7 +270,7 @@ def main():
|
|
| 270 |
for idx, ((start, end), color_id) in enumerate(entity_info):
|
| 271 |
if start > prev_start:
|
| 272 |
colored_text.append((processed_text[prev_start:start], None))
|
| 273 |
-
colored_text.append((processed_text[start:end], f"
|
| 274 |
prev_start = start
|
| 275 |
|
| 276 |
if end < len(processed_text):
|
|
|
|
| 91 |
(0, 64, 128),
|
| 92 |
]
|
| 93 |
|
| 94 |
+
color_map = {f"{color_id}": "red" for color_id, color in enumerate(colors)}
|
| 95 |
|
| 96 |
|
| 97 |
def is_overlapping(rect1, rect2):
|
|
|
|
| 270 |
for idx, ((start, end), color_id) in enumerate(entity_info):
|
| 271 |
if start > prev_start:
|
| 272 |
colored_text.append((processed_text[prev_start:start], None))
|
| 273 |
+
colored_text.append((processed_text[start:end], f"{color_id}"))
|
| 274 |
prev_start = start
|
| 275 |
|
| 276 |
if end < len(processed_text):
|