Spaces:
Build error
Build error
avacaondata
commited on
Commit
•
a021507
1
Parent(s):
4228c91
quitado dropdown
Browse files- app.py +2 -10
- article_app.py +0 -19
app.py
CHANGED
@@ -156,7 +156,6 @@ def search_and_answer(
|
|
156 |
no_repeat_ngram_size,
|
157 |
temperature,
|
158 |
max_answer_length,
|
159 |
-
wav2vec2_name,
|
160 |
do_tts,
|
161 |
):
|
162 |
update_params = {
|
@@ -167,8 +166,8 @@ def search_and_answer(
|
|
167 |
"no_repeat_ngram_size": no_repeat_ngram_size,
|
168 |
}
|
169 |
if not question:
|
170 |
-
s2t_model = models[
|
171 |
-
s2t_processor = models[
|
172 |
question = transcript(
|
173 |
audio_file, audio_array, processor=s2t_processor, model=s2t_model
|
174 |
)
|
@@ -232,13 +231,6 @@ if __name__ == "__main__":
|
|
232 |
label="maximum answer length",
|
233 |
step=1,
|
234 |
),
|
235 |
-
gr.inputs.Dropdown(
|
236 |
-
["wav2vec2-iic"],
|
237 |
-
type="value",
|
238 |
-
default=None,
|
239 |
-
label="Select the speech recognition model.",
|
240 |
-
optional=False,
|
241 |
-
),
|
242 |
gr.inputs.Checkbox(
|
243 |
default=False, label="Text to Speech", optional=True),
|
244 |
],
|
|
|
156 |
no_repeat_ngram_size,
|
157 |
temperature,
|
158 |
max_answer_length,
|
|
|
159 |
do_tts,
|
160 |
):
|
161 |
update_params = {
|
|
|
166 |
"no_repeat_ngram_size": no_repeat_ngram_size,
|
167 |
}
|
168 |
if not question:
|
169 |
+
s2t_model = models["wav2vec2-iic"]["model"]
|
170 |
+
s2t_processor = models["wav2vec2-iic"]["processor"]
|
171 |
question = transcript(
|
172 |
audio_file, audio_array, processor=s2t_processor, model=s2t_model
|
173 |
)
|
|
|
231 |
label="maximum answer length",
|
232 |
step=1,
|
233 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
gr.inputs.Checkbox(
|
235 |
default=False, label="Text to Speech", optional=True),
|
236 |
],
|
article_app.py
CHANGED
@@ -47,7 +47,6 @@ examples = [
|
|
47 |
3,
|
48 |
1.0,
|
49 |
250,
|
50 |
-
"wav2vec2-iic",
|
51 |
False,
|
52 |
],
|
53 |
[
|
@@ -59,7 +58,6 @@ examples = [
|
|
59 |
3,
|
60 |
1.0,
|
61 |
250,
|
62 |
-
"wav2vec2-iic",
|
63 |
False,
|
64 |
],
|
65 |
[
|
@@ -71,7 +69,6 @@ examples = [
|
|
71 |
3,
|
72 |
1.0,
|
73 |
250,
|
74 |
-
"wav2vec2-iic",
|
75 |
False,
|
76 |
],
|
77 |
[
|
@@ -83,7 +80,6 @@ examples = [
|
|
83 |
3,
|
84 |
1.0,
|
85 |
250,
|
86 |
-
"wav2vec2-iic",
|
87 |
False,
|
88 |
],
|
89 |
[
|
@@ -95,7 +91,6 @@ examples = [
|
|
95 |
3,
|
96 |
1.0,
|
97 |
250,
|
98 |
-
"wav2vec2-iic",
|
99 |
False,
|
100 |
],
|
101 |
[
|
@@ -107,7 +102,6 @@ examples = [
|
|
107 |
3,
|
108 |
1.0,
|
109 |
250,
|
110 |
-
"wav2vec2-iic",
|
111 |
False,
|
112 |
],
|
113 |
[
|
@@ -119,7 +113,6 @@ examples = [
|
|
119 |
3,
|
120 |
1.0,
|
121 |
250,
|
122 |
-
"wav2vec2-iic",
|
123 |
False,
|
124 |
],
|
125 |
[
|
@@ -131,7 +124,6 @@ examples = [
|
|
131 |
3,
|
132 |
1.0,
|
133 |
250,
|
134 |
-
"wav2vec2-iic",
|
135 |
False,
|
136 |
],
|
137 |
[
|
@@ -143,7 +135,6 @@ examples = [
|
|
143 |
3,
|
144 |
1.0,
|
145 |
250,
|
146 |
-
"wav2vec2-iic",
|
147 |
False
|
148 |
],
|
149 |
[
|
@@ -155,7 +146,6 @@ examples = [
|
|
155 |
3,
|
156 |
1.0,
|
157 |
250,
|
158 |
-
"wav2vec2-iic",
|
159 |
False
|
160 |
],
|
161 |
[
|
@@ -167,7 +157,6 @@ examples = [
|
|
167 |
3,
|
168 |
1.0,
|
169 |
250,
|
170 |
-
"wav2vec2-iic",
|
171 |
False
|
172 |
],
|
173 |
[
|
@@ -179,7 +168,6 @@ examples = [
|
|
179 |
3,
|
180 |
1.0,
|
181 |
250,
|
182 |
-
"wav2vec2-iic",
|
183 |
False
|
184 |
],
|
185 |
[
|
@@ -191,7 +179,6 @@ examples = [
|
|
191 |
3,
|
192 |
1.0,
|
193 |
250,
|
194 |
-
"wav2vec2-iic",
|
195 |
False
|
196 |
],
|
197 |
[
|
@@ -203,7 +190,6 @@ examples = [
|
|
203 |
3,
|
204 |
1.0,
|
205 |
250,
|
206 |
-
"wav2vec2-iic",
|
207 |
False
|
208 |
],
|
209 |
[
|
@@ -215,7 +201,6 @@ examples = [
|
|
215 |
3,
|
216 |
1.0,
|
217 |
250,
|
218 |
-
"wav2vec2-iic",
|
219 |
False,
|
220 |
],
|
221 |
[
|
@@ -227,7 +212,6 @@ examples = [
|
|
227 |
3,
|
228 |
1.0,
|
229 |
250,
|
230 |
-
"wav2vec2-iic",
|
231 |
False,
|
232 |
],
|
233 |
[
|
@@ -239,7 +223,6 @@ examples = [
|
|
239 |
3,
|
240 |
1.0,
|
241 |
250,
|
242 |
-
"wav2vec2-iic",
|
243 |
False
|
244 |
],
|
245 |
[
|
@@ -251,7 +234,6 @@ examples = [
|
|
251 |
3,
|
252 |
1.0,
|
253 |
250,
|
254 |
-
"wav2vec2-iic",
|
255 |
False
|
256 |
],
|
257 |
[
|
@@ -263,7 +245,6 @@ examples = [
|
|
263 |
3,
|
264 |
1.0,
|
265 |
250,
|
266 |
-
"wav2vec2-iic",
|
267 |
False
|
268 |
],
|
269 |
]
|
|
|
47 |
3,
|
48 |
1.0,
|
49 |
250,
|
|
|
50 |
False,
|
51 |
],
|
52 |
[
|
|
|
58 |
3,
|
59 |
1.0,
|
60 |
250,
|
|
|
61 |
False,
|
62 |
],
|
63 |
[
|
|
|
69 |
3,
|
70 |
1.0,
|
71 |
250,
|
|
|
72 |
False,
|
73 |
],
|
74 |
[
|
|
|
80 |
3,
|
81 |
1.0,
|
82 |
250,
|
|
|
83 |
False,
|
84 |
],
|
85 |
[
|
|
|
91 |
3,
|
92 |
1.0,
|
93 |
250,
|
|
|
94 |
False,
|
95 |
],
|
96 |
[
|
|
|
102 |
3,
|
103 |
1.0,
|
104 |
250,
|
|
|
105 |
False,
|
106 |
],
|
107 |
[
|
|
|
113 |
3,
|
114 |
1.0,
|
115 |
250,
|
|
|
116 |
False,
|
117 |
],
|
118 |
[
|
|
|
124 |
3,
|
125 |
1.0,
|
126 |
250,
|
|
|
127 |
False,
|
128 |
],
|
129 |
[
|
|
|
135 |
3,
|
136 |
1.0,
|
137 |
250,
|
|
|
138 |
False
|
139 |
],
|
140 |
[
|
|
|
146 |
3,
|
147 |
1.0,
|
148 |
250,
|
|
|
149 |
False
|
150 |
],
|
151 |
[
|
|
|
157 |
3,
|
158 |
1.0,
|
159 |
250,
|
|
|
160 |
False
|
161 |
],
|
162 |
[
|
|
|
168 |
3,
|
169 |
1.0,
|
170 |
250,
|
|
|
171 |
False
|
172 |
],
|
173 |
[
|
|
|
179 |
3,
|
180 |
1.0,
|
181 |
250,
|
|
|
182 |
False
|
183 |
],
|
184 |
[
|
|
|
190 |
3,
|
191 |
1.0,
|
192 |
250,
|
|
|
193 |
False
|
194 |
],
|
195 |
[
|
|
|
201 |
3,
|
202 |
1.0,
|
203 |
250,
|
|
|
204 |
False,
|
205 |
],
|
206 |
[
|
|
|
212 |
3,
|
213 |
1.0,
|
214 |
250,
|
|
|
215 |
False,
|
216 |
],
|
217 |
[
|
|
|
223 |
3,
|
224 |
1.0,
|
225 |
250,
|
|
|
226 |
False
|
227 |
],
|
228 |
[
|
|
|
234 |
3,
|
235 |
1.0,
|
236 |
250,
|
|
|
237 |
False
|
238 |
],
|
239 |
[
|
|
|
245 |
3,
|
246 |
1.0,
|
247 |
250,
|
|
|
248 |
False
|
249 |
],
|
250 |
]
|