rishiraj commited on
Commit
95756ed
·
verified ·
1 Parent(s): 005884c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -66,7 +66,7 @@ class GeminiHandler(AsyncAudioVideoStreamHandler):
66
  async def video_emit(self) -> VideoEmitType:
67
  return await self.video_queue.get()
68
 
69
- async def connect(self, api_key: str, about_company: str, about_role: str, responsibilities: str, requirements: str, benefits: str, interview_questions: str):
70
  # with open("prompt.md", "r") as file:
71
  # template = file.read()
72
 
@@ -113,7 +113,7 @@ class GeminiHandler(AsyncAudioVideoStreamHandler):
113
  if not self.args_set.is_set():
114
  await self.wait_for_args()
115
  if self.session is None:
116
- asyncio.create_task(self.connect(self.latest_args[1], self.latest_args[2], self.latest_args[3], self.latest_args[4], self.latest_args[5], self.latest_args[6], self.latest_args[7]))
117
  array = await self.audio_queue.get()
118
  return (self.output_sample_rate, array)
119
 
@@ -169,7 +169,7 @@ with gr.Blocks(css=css) as demo:
169
 
170
  webrtc.stream(
171
  GeminiHandler(),
172
- inputs=[webrtc, api_key, about_company, about_role, responsibilities, requirements, benefits, interview_questions],
173
  outputs=[webrtc],
174
  time_limit=90,
175
  concurrency_limit=2,
 
66
  async def video_emit(self) -> VideoEmitType:
67
  return await self.video_queue.get()
68
 
69
+ async def connect(self, api_key: str):
70
  # with open("prompt.md", "r") as file:
71
  # template = file.read()
72
 
 
113
  if not self.args_set.is_set():
114
  await self.wait_for_args()
115
  if self.session is None:
116
+ asyncio.create_task(self.connect(self.latest_args[1]))
117
  array = await self.audio_queue.get()
118
  return (self.output_sample_rate, array)
119
 
 
169
 
170
  webrtc.stream(
171
  GeminiHandler(),
172
+ inputs=[webrtc, api_key],
173
  outputs=[webrtc],
174
  time_limit=90,
175
  concurrency_limit=2,