Commit
·
76eae58
1
Parent(s):
47b1a98
fix widget
Browse files- create_handler.ipynb +3 -3
- handler.py +1 -1
create_handler.ipynb
CHANGED
@@ -151,7 +151,7 @@
|
|
151 |
" result = self.model.transcribe(audio_nparray)\n",
|
152 |
"\n",
|
153 |
" # postprocess the prediction\n",
|
154 |
-
" return {\"
|
155 |
]
|
156 |
},
|
157 |
{
|
@@ -163,7 +163,7 @@
|
|
163 |
},
|
164 |
{
|
165 |
"cell_type": "code",
|
166 |
-
"execution_count":
|
167 |
"metadata": {},
|
168 |
"outputs": [],
|
169 |
"source": [
|
@@ -175,7 +175,7 @@
|
|
175 |
},
|
176 |
{
|
177 |
"cell_type": "code",
|
178 |
-
"execution_count":
|
179 |
"metadata": {},
|
180 |
"outputs": [
|
181 |
{
|
|
|
151 |
" result = self.model.transcribe(audio_nparray)\n",
|
152 |
"\n",
|
153 |
" # postprocess the prediction\n",
|
154 |
+
" return {\"text\": result[\"text\"]}"
|
155 |
]
|
156 |
},
|
157 |
{
|
|
|
163 |
},
|
164 |
{
|
165 |
"cell_type": "code",
|
166 |
+
"execution_count": 6,
|
167 |
"metadata": {},
|
168 |
"outputs": [],
|
169 |
"source": [
|
|
|
175 |
},
|
176 |
{
|
177 |
"cell_type": "code",
|
178 |
+
"execution_count": null,
|
179 |
"metadata": {},
|
180 |
"outputs": [
|
181 |
{
|
handler.py
CHANGED
@@ -30,4 +30,4 @@ class EndpointHandler():
|
|
30 |
result = self.model.transcribe(audio_nparray)
|
31 |
|
32 |
# postprocess the prediction
|
33 |
-
return {"
|
|
|
30 |
result = self.model.transcribe(audio_nparray)
|
31 |
|
32 |
# postprocess the prediction
|
33 |
+
return {"text": result["text"]}
|