rossarmstrong commited on
Commit
8d9d859
·
1 Parent(s): f19c610

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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
- inputs=[
13
- gr.Textbox(type='str', lines=2, label="Input Reference Text"),
14
- gr.Textbox(type='str', lines=2, label="Input Hypothesis Text")
15
- ]
16
- outputs = gr.outputs.Textbox(label="Word Error Rate")
17
 
18
  iface = gr.Interface(
19
  fn = word_error_rate,
20
- inputs = inputs,
21
- outputs = 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
  )