Spaces:
Running
Running
Update index.html
Browse files- index.html +4 -4
index.html
CHANGED
@@ -30,17 +30,17 @@ transformers_js_py
|
|
30 |
</gradio-requirements>
|
31 |
|
32 |
<gradio-file name="app.py" entrypoint>
|
33 |
-
from transformers_js import import_transformers_js
|
34 |
import gradio as gr
|
35 |
|
36 |
transformers = await import_transformers_js()
|
37 |
pipeline = transformers.pipeline
|
38 |
pipe = await pipeline('automatic-speech-recognition', 'Xenova/whisper-tiny.en')
|
39 |
|
40 |
-
async def transcribe(
|
41 |
-
return await pipe(
|
42 |
|
43 |
-
demo = gr.Interface(transcribe, "
|
44 |
demo.launch()
|
45 |
</gradio-file>
|
46 |
|
|
|
30 |
</gradio-requirements>
|
31 |
|
32 |
<gradio-file name="app.py" entrypoint>
|
33 |
+
from transformers_js import import_transformers_js, as_url
|
34 |
import gradio as gr
|
35 |
|
36 |
transformers = await import_transformers_js()
|
37 |
pipeline = transformers.pipeline
|
38 |
pipe = await pipeline('automatic-speech-recognition', 'Xenova/whisper-tiny.en')
|
39 |
|
40 |
+
async def transcribe(audio):
|
41 |
+
return await pipe(as_url(audio))
|
42 |
|
43 |
+
demo = gr.Interface(transcribe, "audio", "json")
|
44 |
demo.launch()
|
45 |
</gradio-file>
|
46 |
|