camanalo1 commited on
Commit
0c0df10
1 Parent(s): 2c1a9a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -1,11 +1,14 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- pipe = pipeline(task="image-classification",
5
- # model that can do 22k-category classification
6
- model="microsoft/beit-base-patch16-224-pt22k-ft22k")
7
- gr.Interface.from_pipeline(pipe,
8
- title="22k Image Classification",
9
- description="Object Recognition using Microsoft BEIT",
10
- examples = ['wonder_cat.jpg', 'aki_dog.jpg',],
11
- allow_flagging="never").launch(inbrowser=True)
 
 
 
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ # Define the pipeline for speech recognition with the NeMo Canary model
5
+ pipe = pipeline(
6
+ task="automatic-speech-recognition",
7
+ model="nvidia/canary-1b"
8
+ )
9
+
10
+ # Create a Gradio interface from the pipeline
11
+ interface = gr.Interface.from_pipeline(pipe, inputs="microphone", outputs="text")
12
+
13
+ # Launch the interface
14
+ interface.launch()