garyd1 commited on
Commit
a2dbc0f
Β·
verified Β·
1 Parent(s): 81fefa5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +35 -11
app.py CHANGED
@@ -97,20 +97,44 @@ def finalize_interview():
97
  message, audio = mock_interview.end_interview()
98
  return audio
99
 
 
100
  interface = gr.Blocks()
101
 
102
  with interface:
103
- gr.Markdown("### Mock Interview AI\nUpload your resume and job description, then press Submit to start the interview.")
104
-
105
- resume_input = gr.File(label="Upload Resume (PDF)")
106
- job_desc_input = gr.Textbox(label="Paste Job Description")
107
- submit_button = gr.Button("Submit")
108
- audio_input = gr.Audio(type="filepath", label="Your Response")
109
- question_audio_output = gr.Audio(label="Question Audio")
110
- transcription_output = gr.Textbox(label="Transcription")
111
-
112
- submit_button.click(start_interview, inputs=[resume_input, job_desc_input], outputs=[question_audio_output])
113
- audio_input.change(process_response, inputs=[audio_input], outputs=[transcription_output, question_audio_output])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
  if __name__ == "__main__":
116
  interface.launch()
 
97
  message, audio = mock_interview.end_interview()
98
  return audio
99
 
100
+ # Gradio Interface
101
  interface = gr.Blocks()
102
 
103
  with interface:
104
+ gr.Markdown("""
105
+ ## πŸ§‘β€πŸ’Ό Mock Interview AI
106
+ Welcome to the Mock Interview simulator! Follow these steps:
107
+ 1. Upload your resume (PDF format).
108
+ 2. Paste the job description.
109
+ 3. Press "Submit" to start the interview.
110
+ The system will ask questions and listen to your responses automatically. Good luck!
111
+ """)
112
+
113
+ with gr.Row():
114
+ with gr.Column(scale=2):
115
+ gr.Markdown("### Upload Details")
116
+ resume_input = gr.File(label="πŸ“„ Upload Resume (PDF)")
117
+ job_desc_input = gr.Textbox(
118
+ label="πŸ“ Paste Job Description",
119
+ placeholder="Paste the job description here...",
120
+ lines=5,
121
+ )
122
+ submit_button = gr.Button("πŸš€ Submit & Start Interview")
123
+
124
+ with gr.Column(scale=1):
125
+ gr.Markdown("### Interview Progress")
126
+ question_audio_output = gr.Audio(label="🎀 Question Audio")
127
+ transcription_output = gr.Textbox(label="πŸ—’οΈ Your Transcription", lines=3)
128
+
129
+ gr.Markdown("### Respond to Questions")
130
+ audio_input = gr.Audio(source="microphone", type="filepath", label="πŸŽ™οΈ Speak Your Answer")
131
+
132
+ submit_button.click(
133
+ start_interview, inputs=[resume_input, job_desc_input], outputs=[question_audio_output]
134
+ )
135
+ audio_input.change(
136
+ process_response, inputs=[audio_input], outputs=[transcription_output, question_audio_output]
137
+ )
138
 
139
  if __name__ == "__main__":
140
  interface.launch()