Spaces:
Runtime error
Runtime error
samarthagarwal23
commited on
Commit
•
5a3144d
1
Parent(s):
1b1d0d5
Update app.py
Browse files
app.py
CHANGED
@@ -69,7 +69,8 @@ def cstr_break(s, color='black'):
|
|
69 |
return "<text style=color:{}>{}<br></text>".format(color, s)
|
70 |
|
71 |
def print_colored(text, start_idx, end_idx, confidence):
|
72 |
-
|
|
|
73 |
#a = colored(text[:start_idx]) + colored(text[start_idx:end_idx], 'red', 'on_yellow') + colored(text[end_idx:])
|
74 |
return a
|
75 |
|
|
|
69 |
return "<text style=color:{}>{}<br></text>".format(color, s)
|
70 |
|
71 |
def print_colored(text, start_idx, end_idx, confidence):
|
72 |
+
conf_str = 'Confidence: ' + confidence)
|
73 |
+
a = cstr_break(' '.join(cstr(' '.join([text[:start_idx], cstr_bold(text[start_idx:end_idx], color='red'), text[end_idx:]]), color='black'), conf_str))
|
74 |
#a = colored(text[:start_idx]) + colored(text[start_idx:end_idx], 'red', 'on_yellow') + colored(text[end_idx:])
|
75 |
return a
|
76 |
|