vmoras commited on
Commit
3041c48
1 Parent(s): 1c0b271

Add waiting to audio

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  from functions import *
2
 
3
 
@@ -30,7 +31,7 @@ with (gr.Blocks() as app):
30
  label='GPU', info='Select the size of GPU (at the moment they are the same)',
31
  visible=False
32
  )
33
- predict_language = gr.Checkbox(label='Predict language')
34
 
35
  with gr.Column():
36
  with gr.Row():
@@ -65,11 +66,11 @@ with (gr.Blocks() as app):
65
  ).then(
66
  init_chatbot, [chat, language], [video, chat, user_id]
67
  )
68
- import time
69
  button_text.click(
70
  play_searching, language, video
71
  ).then(
72
- lambda : time.sleep(5), None, None
73
  ).then(
74
  get_answer_text,
75
  [text, chat, user_id, checkbox, radio, predict_language],
@@ -78,6 +79,8 @@ with (gr.Blocks() as app):
78
 
79
  button_audio.click(
80
  play_searching, language, video
 
 
81
  ).then(
82
  get_answer_audio,
83
  [audio, chat, user_id, checkbox, radio, predict_language],
 
1
+ import time
2
  from functions import *
3
 
4
 
 
31
  label='GPU', info='Select the size of GPU (at the moment they are the same)',
32
  visible=False
33
  )
34
+ predict_language = gr.Checkbox(label='Predict language', visible=False)
35
 
36
  with gr.Column():
37
  with gr.Row():
 
66
  ).then(
67
  init_chatbot, [chat, language], [video, chat, user_id]
68
  )
69
+
70
  button_text.click(
71
  play_searching, language, video
72
  ).then(
73
+ lambda: time.sleep(6), None, None
74
  ).then(
75
  get_answer_text,
76
  [text, chat, user_id, checkbox, radio, predict_language],
 
79
 
80
  button_audio.click(
81
  play_searching, language, video
82
+ ).then(
83
+ lambda: time.sleep(6), None, None
84
  ).then(
85
  get_answer_audio,
86
  [audio, chat, user_id, checkbox, radio, predict_language],