vsrinivas commited on
Commit
7053531
·
verified ·
1 Parent(s): 034d51f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -39,8 +39,8 @@ 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 * 4 + 1) # Reset outputs of transcripts, translated texts, and dubbed videos
44
 
45
 
46
  def wait_for_dubbing_completion(dubbing_id: str) -> bool:
@@ -250,7 +250,7 @@ def create_gradio_interface(n_participants, language_choices):
250
  gr.Markdown("""# LinguaPolis: Bridging Languages, Uniting Teams Globally - Multilingual Conference Call Simulation
251
  ## Record your video or upload your video and press the corresponding Submit button at the bottom""")
252
 
253
- meeting_texts = []
254
 
255
  video_inputs = []
256
  language_dropdowns = []
@@ -274,8 +274,8 @@ def create_gradio_interface(n_participants, language_choices):
274
  gr.Button(f"Submit Speaker {i+1}'s Speech").click(
275
  process_speaker,
276
  # [video_inputs[i], gr.State(i), gr.State(n_participants)] + [language_dropdowns[j] for j in range(n_participants)],
277
- [video_inputs[i], gr.State(i), gr.State(n_participants)] + [gr.State(meeting_texts)] + [language_dropdowns[j] for j in range(n_participants)],
278
- [transcript_outputs[i]] + [k for j in zip(translated_texts[:i]+translated_texts[i+1:], dubbed_videos[:i]+dubbed_videos[i+1:]) for k in j] + [gr.State(meeting_texts)]
279
  )
280
  minutes = gr.Textbox(label="Minutes of Meeting")
281
  gr.Button(f"Generate Minutes of meeting").click(summarize, meeting_texts, minutes)
 
39
 
40
  def clear_all():
41
  # global meeting_texts
42
+ # meeting_texts = [] # Reset meeting texts
43
+ return [None] * (n_participants * 5 + 1) # Reset outputs of transcripts, translated texts, and dubbed videos
44
 
45
 
46
  def wait_for_dubbing_completion(dubbing_id: str) -> bool:
 
250
  gr.Markdown("""# LinguaPolis: Bridging Languages, Uniting Teams Globally - Multilingual Conference Call Simulation
251
  ## Record your video or upload your video and press the corresponding Submit button at the bottom""")
252
 
253
+ # meeting_texts = []
254
 
255
  video_inputs = []
256
  language_dropdowns = []
 
274
  gr.Button(f"Submit Speaker {i+1}'s Speech").click(
275
  process_speaker,
276
  # [video_inputs[i], gr.State(i), gr.State(n_participants)] + [language_dropdowns[j] for j in range(n_participants)],
277
+ [video_inputs[i], gr.State(i), gr.State(n_participants)] + [gr.State(value=[])] + [language_dropdowns[j] for j in range(n_participants)],
278
+ [transcript_outputs[i]] + [k for j in zip(translated_texts[:i]+translated_texts[i+1:], dubbed_videos[:i]+dubbed_videos[i+1:]) for k in j] + [gr.State()]
279
  )
280
  minutes = gr.Textbox(label="Minutes of Meeting")
281
  gr.Button(f"Generate Minutes of meeting").click(summarize, meeting_texts, minutes)