Rich Gregson commited on
Commit
15cc3f6
1 Parent(s): 0afe8f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -9
app.py CHANGED
@@ -5,7 +5,7 @@ import whisper
5
 
6
  from share_btn import community_icon_html, loading_icon_html, share_js
7
 
8
- model = whisper.load_model("large")
9
 
10
 
11
 
@@ -159,11 +159,11 @@ with block:
159
  <rect x="23" y="69" width="23" height="23" fill="black"></rect>
160
  </svg>
161
  <h1 style="font-weight: 900; margin-bottom: 7px;">
162
- Transcribe tool for CXD
163
  </h1>
164
  </div>
165
  <p style="margin-bottom: 10px; font-size: 94%">
166
- Record and transcribe the audio input from your microphone.
167
  </p>
168
  </div>
169
  """
@@ -183,17 +183,13 @@ with block:
183
  with gr.Group(elem_id="share-btn-container"):
184
  community_icon = gr.HTML(community_icon_html, visible=False)
185
  loading_icon = gr.HTML(loading_icon_html, visible=False)
186
- share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
187
 
188
 
189
 
190
 
191
  btn.click(inference, inputs=[audio], outputs=[text, community_icon, loading_icon, share_button])
192
- share_button.click(None, [], [], _js=share_js)
193
-
194
-
195
-
196
- btn.click(inference, inputs=[audio], outputs=[text])
197
 
198
  gr.HTML('''
199
  <div class="footer">
 
5
 
6
  from share_btn import community_icon_html, loading_icon_html, share_js
7
 
8
+ model = whisper.load_model("small")
9
 
10
 
11
 
 
159
  <rect x="23" y="69" width="23" height="23" fill="black"></rect>
160
  </svg>
161
  <h1 style="font-weight: 900; margin-bottom: 7px;">
162
+ Whisper
163
  </h1>
164
  </div>
165
  <p style="margin-bottom: 10px; font-size: 94%">
166
+ Whisper is a general-purpose speech recognition model. It is trained on a large dataset of diverse audio and is also a multi-task model that can perform multilingual speech recognition as well as speech translation and language identification. This demo cuts audio after around 30 secs.
167
  </p>
168
  </div>
169
  """
 
183
  with gr.Group(elem_id="share-btn-container"):
184
  community_icon = gr.HTML(community_icon_html, visible=False)
185
  loading_icon = gr.HTML(loading_icon_html, visible=False)
186
+ share_button = gr.Button("Share on the Discussion Forum", elem_id="share-btn", visible=False)
187
 
188
 
189
 
190
 
191
  btn.click(inference, inputs=[audio], outputs=[text, community_icon, loading_icon, share_button])
192
+ share_button.click(None, [], [], _js=share_js)
 
 
 
 
193
 
194
  gr.HTML('''
195
  <div class="footer">