Spaces:
Sleeping
Sleeping
sotirios-slv
commited on
Commit
•
ec191f4
1
Parent(s):
4e87eb3
Updated formatting for score returned
Browse files
app.py
CHANGED
@@ -80,12 +80,12 @@ def transcribe_audio(diction_text, audio):
|
|
80 |
try:
|
81 |
result = pipe(audio)
|
82 |
diff_text = diff_texts(diction_text, result["text"])
|
83 |
-
score =
|
84 |
|
85 |
except Exception as e:
|
86 |
raise gr.Error(f"Uh oh and error occurred: {e}", duration=5)
|
87 |
|
88 |
-
return diff_text, score
|
89 |
|
90 |
|
91 |
highlighted_results = gr.HighlightedText(
|
@@ -95,7 +95,7 @@ highlighted_results = gr.HighlightedText(
|
|
95 |
color_map={"+": "red", "-": "green"},
|
96 |
)
|
97 |
|
98 |
-
score = gr.Textbox("
|
99 |
|
100 |
|
101 |
input_audio = gr.Audio(
|
|
|
80 |
try:
|
81 |
result = pipe(audio)
|
82 |
diff_text = diff_texts(diction_text, result["text"])
|
83 |
+
score = 100
|
84 |
|
85 |
except Exception as e:
|
86 |
raise gr.Error(f"Uh oh and error occurred: {e}", duration=5)
|
87 |
|
88 |
+
return diff_text, f"{score}%"
|
89 |
|
90 |
|
91 |
highlighted_results = gr.HighlightedText(
|
|
|
95 |
color_map={"+": "red", "-": "green"},
|
96 |
)
|
97 |
|
98 |
+
score = gr.Textbox("0%")
|
99 |
|
100 |
|
101 |
input_audio = gr.Audio(
|