garyd1 commited on
Commit
02b7531
·
verified ·
1 Parent(s): d72f5a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -55,13 +55,16 @@ class MockInterview:
55
  self.resume_embeddings = process_resume(resume)
56
  self.job_desc_embedding = process_job_description(job_desc)
57
  self.interview_active = True
58
- return "Resume and job description processed. Interview is starting."
59
 
60
  def conduct_interview(self, audio_file):
61
  if not self.interview_active:
62
  return "Please upload your resume and job description first.", ""
63
 
64
  transcription = stt_model(audio_file)["text"] # Transcribe audio
 
 
 
65
  question = generate_question(transcription, self.resume_embeddings)
66
  return transcription, question
67
 
 
55
  self.resume_embeddings = process_resume(resume)
56
  self.job_desc_embedding = process_job_description(job_desc)
57
  self.interview_active = True
58
+ return "Resume and job description processed. Interview is ready to start."
59
 
60
  def conduct_interview(self, audio_file):
61
  if not self.interview_active:
62
  return "Please upload your resume and job description first.", ""
63
 
64
  transcription = stt_model(audio_file)["text"] # Transcribe audio
65
+ if not transcription.strip():
66
+ return "No audio detected. Please try again.", ""
67
+
68
  question = generate_question(transcription, self.resume_embeddings)
69
  return transcription, question
70