Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -220,6 +220,17 @@ def inference(file_name, _clear_punctuation_references, _clear_punctuation_predi
|
|
220 |
results.append(f"- RTF: {round(rtf, 4)}")
|
221 |
|
222 |
if _show_chars:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
all_chars = set()
|
224 |
for pred in predictions:
|
225 |
for c in pred:
|
@@ -256,7 +267,7 @@ with demo:
|
|
256 |
label="Clear punctuation (in predictions), some chars and convert to lowercase",
|
257 |
)
|
258 |
show_chars = gr.Checkbox(
|
259 |
-
label="Show chars in predictions",
|
260 |
)
|
261 |
batch_mode = gr.Checkbox(
|
262 |
label="Use batch mode",
|
|
|
220 |
results.append(f"- RTF: {round(rtf, 4)}")
|
221 |
|
222 |
if _show_chars:
|
223 |
+
all_chars = set()
|
224 |
+
for ref in references:
|
225 |
+
for c in ref:
|
226 |
+
all_chars.add(c)
|
227 |
+
|
228 |
+
sorted_chars = natsorted(list(all_chars))
|
229 |
+
|
230 |
+
results.append("")
|
231 |
+
results.append(f"Chars in references:")
|
232 |
+
results.append(f"{sorted_chars}")
|
233 |
+
|
234 |
all_chars = set()
|
235 |
for pred in predictions:
|
236 |
for c in pred:
|
|
|
267 |
label="Clear punctuation (in predictions), some chars and convert to lowercase",
|
268 |
)
|
269 |
show_chars = gr.Checkbox(
|
270 |
+
label="Show chars in references/predictions",
|
271 |
)
|
272 |
batch_mode = gr.Checkbox(
|
273 |
label="Use batch mode",
|