Commit
·
8d9d859
1
Parent(s):
f19c610
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,16 +9,16 @@ def word_error_rate(reference, hypothesis):
|
|
| 9 |
|
| 10 |
title = "Word Error Rate Calculator"
|
| 11 |
description = '''A simple application to quickly calculate the Word Error Rate (WER)'''
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
|
| 18 |
iface = gr.Interface(
|
| 19 |
fn = word_error_rate,
|
| 20 |
-
inputs =
|
| 21 |
-
outputs =
|
| 22 |
title = title,
|
| 23 |
description = description
|
| 24 |
)
|
|
|
|
| 9 |
|
| 10 |
title = "Word Error Rate Calculator"
|
| 11 |
description = '''A simple application to quickly calculate the Word Error Rate (WER)'''
|
| 12 |
+
|
| 13 |
+
# Define the input and output interfaces
|
| 14 |
+
input_reference = gr.inputs.Textbox(lines=2, label="Input Reference Text")
|
| 15 |
+
input_hypothesis = gr.inputs.Textbox(lines=2, label="Input Hypothesis Text")
|
| 16 |
+
output_wer = gr.outputs.Textbox(label="Word Error Rate")
|
| 17 |
|
| 18 |
iface = gr.Interface(
|
| 19 |
fn = word_error_rate,
|
| 20 |
+
inputs = [input_reference, input_hypothesis],
|
| 21 |
+
outputs = output_wer,
|
| 22 |
title = title,
|
| 23 |
description = description
|
| 24 |
)
|