Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def update_passage(passage_name):
|
|
17 |
try:
|
18 |
|
19 |
sum = wikipedia.summary(wikipedia.search(passage_name)[0], sentences=2, auto_suggest=False)
|
20 |
-
print(sum, wikipedia.search(passage_name))
|
21 |
passage.value = sum
|
22 |
except:
|
23 |
sum = "Please specify your article theme differently"
|
@@ -53,8 +53,7 @@ def inference(audio, gt: str):
|
|
53 |
# error = jiwer.wer(passage, result.text)
|
54 |
we_num = error * len(gt.split())
|
55 |
# print(f"WER is {we_num}")
|
56 |
-
print(result.text)
|
57 |
-
print(gt)
|
58 |
|
59 |
return f"For a {audio_length} second audio, {we_num} errors were made, resulting in a final time of {audio_length + we_num}.\n\n{result.text}", gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
60 |
|
|
|
17 |
try:
|
18 |
|
19 |
sum = wikipedia.summary(wikipedia.search(passage_name)[0], sentences=2, auto_suggest=False)
|
20 |
+
# print(sum, wikipedia.search(passage_name))
|
21 |
passage.value = sum
|
22 |
except:
|
23 |
sum = "Please specify your article theme differently"
|
|
|
53 |
# error = jiwer.wer(passage, result.text)
|
54 |
we_num = error * len(gt.split())
|
55 |
# print(f"WER is {we_num}")
|
56 |
+
print(result.text, gt)
|
|
|
57 |
|
58 |
return f"For a {audio_length} second audio, {we_num} errors were made, resulting in a final time of {audio_length + we_num}.\n\n{result.text}", gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
59 |
|