Helw150 commited on
Commit
38699b4
1 Parent(s): 0d5fe86

Remove Spinning DiVA

Browse files
Files changed (1) hide show
  1. app.py +8 -32
app.py CHANGED
@@ -185,8 +185,6 @@ async function main() {
185
  if (record != null) {
186
  console.log(record);
187
  record.click();
188
- var logo = document.querySelector('.spinning-logo');
189
- logo.style = "animation: rotation 10s infinite linear; height: 10vw; margin: auto;"
190
  }
191
  },
192
  onSpeechEnd: (audio) => {
@@ -194,8 +192,6 @@ async function main() {
194
  if (stop != null) {
195
  console.log(stop);
196
  stop.click();
197
- var logo = document.querySelector('.spinning-logo');
198
- logo.style = "animation: rotation 1s infinite linear; height: 10vw; margin: auto;"
199
  }
200
  }
201
  })
@@ -214,38 +210,18 @@ js_reset = """
214
  var record = document.querySelector('.record-button');
215
  record.textContent = "Just Start Talking!"
216
  record.style = "width: 11vw"
217
- var logo = document.querySelector('.spinning-logo');
218
- logo.style = "height: 10vw; margin: auto;"
219
  }
220
  """
221
 
222
- css = """
223
- @keyframes rotation {
224
- from {
225
- transform: rotate(0deg);
226
- }
227
- to {
228
- transform: rotate(360deg);
229
- }
230
- }
231
- """
232
-
233
- with gr.Blocks(theme=theme, js=js, css=css) as demo:
234
  with gr.Row():
235
- with gr.Column(scale=9):
236
- gr.HTML(
237
- """
238
- <img class="spinning-logo" src="https://diva-audio.github.io/static/DiVA-logo.png" alt="A Cute Small Robot with DiVA Written on It's Chest" style="height: 10vw; margin: auto;">
239
- """
240
- )
241
- with gr.Column(scale=1):
242
- input_audio = gr.Audio(
243
- label="Input Audio",
244
- sources=["microphone"],
245
- type="numpy",
246
- streaming=False,
247
- waveform_options=gr.WaveformOptions(show_recording_waveform=False),
248
- )
249
  with gr.Row():
250
  chatbot = gr.Chatbot(label="Conversation", type="messages")
251
  with gr.Row(max_height="50vh"):
 
185
  if (record != null) {
186
  console.log(record);
187
  record.click();
 
 
188
  }
189
  },
190
  onSpeechEnd: (audio) => {
 
192
  if (stop != null) {
193
  console.log(stop);
194
  stop.click();
 
 
195
  }
196
  }
197
  })
 
210
  var record = document.querySelector('.record-button');
211
  record.textContent = "Just Start Talking!"
212
  record.style = "width: 11vw"
 
 
213
  }
214
  """
215
 
216
+ with gr.Blocks(theme=theme, js=js) as demo:
 
 
 
 
 
 
 
 
 
 
 
217
  with gr.Row():
218
+ input_audio = gr.Audio(
219
+ label="Input Audio",
220
+ sources=["microphone"],
221
+ type="numpy",
222
+ streaming=False,
223
+ waveform_options=gr.WaveformOptions(waveform_color="#B83A4B"),
224
+ )
 
 
 
 
 
 
 
225
  with gr.Row():
226
  chatbot = gr.Chatbot(label="Conversation", type="messages")
227
  with gr.Row(max_height="50vh"):