awacke1 commited on
Commit
b4e883a
·
1 Parent(s): cf9ccf6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -163,8 +163,8 @@ def transcribe(audio, state=""):
163
  if type(transcriptions) == tuple and len(transcriptions) == 2:
164
  transcriptions = transcriptions[0]
165
  transcriptions = transcriptions[0]
 
166
  state = state + transcriptions + " "
167
- store_message(state, state) # Save to dataset
168
  return state, state
169
 
170
  iface = gr.Interface(
@@ -172,17 +172,23 @@ iface = gr.Interface(
172
  inputs=[
173
  gr.Audio(source="microphone", type='filepath', streaming=True),
174
  "state",
 
 
175
  ],
176
  outputs=[
177
  "textbox",
178
  "state",
 
 
 
 
179
  ],
180
  layout="horizontal",
181
  theme="huggingface",
182
  title="🗣️LiveSpeechRecognition🧠Memory💾",
183
- description="Demo for English speech recognition using Conformer Transducers",
184
  allow_flagging='never',
185
  live=True,
186
- article=f"Memory💾 Dataset: [{DATASET_REPO_URL}]({DATASET_REPO_URL})"
187
  )
188
  iface.launch()
 
163
  if type(transcriptions) == tuple and len(transcriptions) == 2:
164
  transcriptions = transcriptions[0]
165
  transcriptions = transcriptions[0]
166
+ store_message(transcriptions, state) # Save to dataset
167
  state = state + transcriptions + " "
 
168
  return state, state
169
 
170
  iface = gr.Interface(
 
172
  inputs=[
173
  gr.Audio(source="microphone", type='filepath', streaming=True),
174
  "state",
175
+ gr.Image(label="Webcam", source="webcam"),
176
+ gr.File(label="File"),
177
  ],
178
  outputs=[
179
  "textbox",
180
  "state",
181
+ gr.HighlightedText(label="HighlightedText", color_map={"punc": "pink", "test 0": "blue"}),
182
+ gr.HighlightedText(label="HighlightedText", show_legend=True),
183
+ gr.JSON(label="JSON"),
184
+ gr.HTML(label="HTML"),
185
  ],
186
  layout="horizontal",
187
  theme="huggingface",
188
  title="🗣️LiveSpeechRecognition🧠Memory💾",
189
+ description="Live Automatic Speech Recognition (ASR) with Memory💾 Dataset: [{DATASET_REPO_URL}]({DATASET_REPO_URL})"",
190
  allow_flagging='never',
191
  live=True,
192
+ article=f"Result Output Saved to Memory💾 Dataset: [{DATASET_REPO_URL}]({DATASET_REPO_URL})"
193
  )
194
  iface.launch()