Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
3a3b17f
1
Parent(s):
8674838
Add file
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def audio_search(audio_tuple):
|
|
40 |
return pd.DataFrame(rows)[["path", "audio", "sentence", "distance"]].sort_values(by="distance", ascending=True)
|
41 |
|
42 |
|
43 |
-
|
44 |
fn=audio_search,
|
45 |
inputs=gr.Audio(
|
46 |
label="Record or upload a clip of your voice", sources=["microphone", "upload"]
|
@@ -50,4 +50,28 @@ demo = gr.Interface(
|
|
50 |
datatype=["str", "html", "str", "number"],
|
51 |
),
|
52 |
)
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
return pd.DataFrame(rows)[["path", "audio", "sentence", "distance"]].sort_values(by="distance", ascending=True)
|
41 |
|
42 |
|
43 |
+
iface = gr.Interface(
|
44 |
fn=audio_search,
|
45 |
inputs=gr.Audio(
|
46 |
label="Record or upload a clip of your voice", sources=["microphone", "upload"]
|
|
|
50 |
datatype=["str", "html", "str", "number"],
|
51 |
),
|
52 |
)
|
53 |
+
with gr.Blocks() as demo:
|
54 |
+
gr.HTML(
|
55 |
+
f"""
|
56 |
+
<h1 style='text-align: center'>
|
57 |
+
<img src="/gradio_api/file=logo.svg" alt="Voice Match" style="width: 95px; height: 30px;"> <br> Voice Match
|
58 |
+
</h1>
|
59 |
+
"""
|
60 |
+
)
|
61 |
+
gr.HTML(
|
62 |
+
f"""
|
63 |
+
<h2 style='text-align: center'>
|
64 |
+
Powered by <a href="https://huggingface.co/rimelabs/rimecaster">RimeCaster</a>
|
65 |
+
</h2>
|
66 |
+
"""
|
67 |
+
)
|
68 |
+
gr.Markdown(
|
69 |
+
f"""
|
70 |
+
<div style='text-align: center'>
|
71 |
+
Record or upload an English clip of your voice and we'll find the most similar voices in the <a href="https://huggingface.co/datasets/mozilla-foundation/common_voice_17_0">Common Voice dataset</a>.
|
72 |
+
</div>
|
73 |
+
"""
|
74 |
+
)
|
75 |
+
iface.render()
|
76 |
+
|
77 |
+
demo.launch(allowed_paths=["logo.svg"])
|
logo.svg
ADDED
|