vsrinivas commited on
Commit
84b997f
·
verified ·
1 Parent(s): 230b373

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -37,6 +37,11 @@ meeting_texts = []
37
  n_participants = 4 # This can be adjusted based on the number of people in the call
38
  language_choices = ["English", "Polish", "Hindi", "Arabic"]
39
 
 
 
 
 
 
40
 
41
  def wait_for_dubbing_completion(dubbing_id: str) -> bool:
42
  """
@@ -242,6 +247,9 @@ def create_participant_row(i, language_choices):
242
  def create_gradio_interface(n_participants, language_choices):
243
  with gr.Blocks() as demo:
244
  gr.Markdown("# LinguaPolis: Bridging Languages, Uniting Teams Globally - Multilingual Conference Call Simulation")
 
 
 
245
 
246
  video_inputs = []
247
  language_dropdowns = []
 
37
  n_participants = 4 # This can be adjusted based on the number of people in the call
38
  language_choices = ["English", "Polish", "Hindi", "Arabic"]
39
 
40
+ def clear_all():
41
+ global meeting_texts
42
+ meeting_texts = [] # Reset meeting texts
43
+ return [None] * (n_participants * 3 + 1) # Reset outputs of transcripts, translated texts, and dubbed videos
44
+
45
 
46
  def wait_for_dubbing_completion(dubbing_id: str) -> bool:
47
  """
 
247
  def create_gradio_interface(n_participants, language_choices):
248
  with gr.Blocks() as demo:
249
  gr.Markdown("# LinguaPolis: Bridging Languages, Uniting Teams Globally - Multilingual Conference Call Simulation")
250
+
251
+ # Clear button to reset inputs and outputs
252
+ clear_button = gr.Button("Clear All").click(clear_all, None, [*transcript_outputs, *translated_texts, *dubbed_videos, minutes])
253
 
254
  video_inputs = []
255
  language_dropdowns = []