ggoknar commited on
Commit
5c0eed5
1 Parent(s): 554d1f6

fix trasncription to mistral

Browse files
Files changed (1) hide show
  1. app.py +1 -34
app.py CHANGED
@@ -211,7 +211,7 @@ def add_file(history, file):
211
  text = "Transcription seems failed, please tell me a joke about chickens"
212
 
213
  history = history + [(text, None)]
214
- yield history
215
 
216
 
217
  ##NOTE: not using this as it yields a chacter each time while we need to feed history to TTS
@@ -387,39 +387,6 @@ def generate_speech(history):
387
  print("RuntimeError: non device-side assert error:", str(e))
388
  raise e
389
 
390
- # Spoken on autoplay everysencen now produce a concataned one at the one
391
- # requires pip install ffmpeg-python
392
- # files_to_concat= [ffmpeg.input(w) for w in wav_list]
393
- # combined_file_name="combined.wav"
394
- # ffmpeg.concat(*files_to_concat,v=0, a=1).output(combined_file_name).run(overwrite_output=True)
395
-
396
- # yield (combined_file_name, history)
397
-
398
-
399
- css = """
400
- .bot .chatbot p {
401
- overflow: hidden; /* Ensures the content is not revealed until the animation */
402
- //border-right: .15em solid orange; /* The typwriter cursor */
403
- white-space: nowrap; /* Keeps the content on a single line */
404
- margin: 0 auto; /* Gives that scrolling effect as the typing happens */
405
- letter-spacing: .15em; /* Adjust as needed */
406
- animation:
407
- typing 3.5s steps(40, end);
408
- blink-caret .75s step-end infinite;
409
- }
410
-
411
- /* The typing effect */
412
- @keyframes typing {
413
- from { width: 0 }
414
- to { width: 100% }
415
- }
416
-
417
- /* The typewriter cursor effect */
418
- @keyframes blink-caret {
419
- from, to { border-color: transparent }
420
- 50% { border-color: orange; }
421
- }
422
- """
423
 
424
  with gr.Blocks(title=title) as demo:
425
  gr.Markdown(DESCRIPTION)
 
211
  text = "Transcription seems failed, please tell me a joke about chickens"
212
 
213
  history = history + [(text, None)]
214
+ return history, gr.update(value="", interactive=False)
215
 
216
 
217
  ##NOTE: not using this as it yields a chacter each time while we need to feed history to TTS
 
387
  print("RuntimeError: non device-side assert error:", str(e))
388
  raise e
389
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
390
 
391
  with gr.Blocks(title=title) as demo:
392
  gr.Markdown(DESCRIPTION)