Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -48,13 +48,13 @@ def generate_question(user_input, resume_embeddings):
|
|
48 |
# Gradio interface
|
49 |
def mock_interview(audio, pdf):
|
50 |
resume_embeddings = process_resume(pdf)
|
51 |
-
transcription = stt_model(audio
|
52 |
-
question = generate_question(transcription, resume_embeddings)
|
53 |
-
return transcription, question
|
54 |
|
55 |
interface = gr.Interface(
|
56 |
fn=mock_interview,
|
57 |
-
inputs=[gr.Audio(
|
58 |
outputs=["text", "text"],
|
59 |
title="Mock Interview AI",
|
60 |
description="Upload your resume and answer questions in a mock interview."
|
|
|
48 |
# Gradio interface
|
49 |
def mock_interview(audio, pdf):
|
50 |
resume_embeddings = process_resume(pdf)
|
51 |
+
transcription = stt_model(audio["name"]) # Using Gradio's audio file object
|
52 |
+
question = generate_question(transcription["text"], resume_embeddings)
|
53 |
+
return transcription["text"], question
|
54 |
|
55 |
interface = gr.Interface(
|
56 |
fn=mock_interview,
|
57 |
+
inputs=[gr.Audio(type="filepath"), gr.File(label="Upload Resume (PDF)")],
|
58 |
outputs=["text", "text"],
|
59 |
title="Mock Interview AI",
|
60 |
description="Upload your resume and answer questions in a mock interview."
|