Spaces:
Runtime error
Runtime error
Abubakar Abid
commited on
Commit
·
4d2def1
1
Parent(s):
09da2a2
Update app.py
Browse files
app.py
CHANGED
@@ -85,7 +85,10 @@ output = gr.outputs.HTML(label="")
|
|
85 |
|
86 |
description = (
|
87 |
"This demo from Microsoft will compare two speech samples and determine if they are from the same speaker. "
|
88 |
-
"Try it with your own voice!"
|
|
|
|
|
|
|
89 |
)
|
90 |
article = (
|
91 |
"<p style='text-align: center'>"
|
@@ -99,11 +102,17 @@ examples = [
|
|
99 |
["samples/cate_blanch.mp3", "samples/kirsten_dunst.wav"],
|
100 |
]
|
101 |
|
|
|
|
|
|
|
|
|
|
|
102 |
interface = gr.Interface(
|
103 |
fn=similarity_fn,
|
104 |
inputs=inputs,
|
105 |
outputs=output,
|
106 |
description=description,
|
|
|
107 |
layout="horizontal",
|
108 |
theme="huggingface",
|
109 |
allow_flagging=False,
|
|
|
85 |
|
86 |
description = (
|
87 |
"This demo from Microsoft will compare two speech samples and determine if they are from the same speaker. "
|
88 |
+
"Try it with your own voice! If you find an incorrect prediction, you can click FLAG to save the recordings to a public dataset: "
|
89 |
+
"https://huggingface.co/datasets/abidlabs/voice-verification-adversarial-dataset, "
|
90 |
+
"consisting of samples on which the model makes mistakes, which may further improve research in this field. Disclaimer: this will "
|
91 |
+
"save the recordings to a PUBLIC dataset so please be careful about what you FLAG."
|
92 |
)
|
93 |
article = (
|
94 |
"<p style='text-align: center'>"
|
|
|
102 |
["samples/cate_blanch.mp3", "samples/kirsten_dunst.wav"],
|
103 |
]
|
104 |
|
105 |
+
HF_TOKEN = os.getenv('HF_TOKEN')
|
106 |
+
hf_saver = gr.HuggingFaceDatasetSaver(HF_TOKEN, "voice-verification-adversarial-dataset")
|
107 |
+
gr.Interface.load("huggingface/t5-base", flagging_callback=hf_saver, description=description).launch()
|
108 |
+
|
109 |
+
|
110 |
interface = gr.Interface(
|
111 |
fn=similarity_fn,
|
112 |
inputs=inputs,
|
113 |
outputs=output,
|
114 |
description=description,
|
115 |
+
title="Break this voice verification model!",
|
116 |
layout="horizontal",
|
117 |
theme="huggingface",
|
118 |
allow_flagging=False,
|