Spaces:
Sleeping
Sleeping
sotirios-slv
commited on
Commit
•
75795f2
1
Parent(s):
d6bc47b
Added a simple diction script
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import
|
2 |
|
3 |
import gradio as gr
|
4 |
|
@@ -15,6 +15,14 @@ description = """
|
|
15 |
</div>
|
16 |
"""
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
device = "cpu"
|
20 |
# device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
@@ -67,7 +75,7 @@ input_audio = gr.Audio(
|
|
67 |
)
|
68 |
demo = gr.Interface(
|
69 |
fn=transcribe_audio,
|
70 |
-
inputs=input_audio,
|
71 |
outputs="text",
|
72 |
title="Test your diction",
|
73 |
description=description,
|
|
|
1 |
+
from difflib import Differ
|
2 |
|
3 |
import gradio as gr
|
4 |
|
|
|
15 |
</div>
|
16 |
"""
|
17 |
|
18 |
+
diction_text = """
|
19 |
+
<div>
|
20 |
+
<p>How now brown cow</p>
|
21 |
+
</div>
|
22 |
+
"""
|
23 |
+
|
24 |
+
diction = gr.HTML(diction_text)
|
25 |
+
|
26 |
|
27 |
device = "cpu"
|
28 |
# device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
|
|
75 |
)
|
76 |
demo = gr.Interface(
|
77 |
fn=transcribe_audio,
|
78 |
+
inputs=[diction, input_audio],
|
79 |
outputs="text",
|
80 |
title="Test your diction",
|
81 |
description=description,
|