File size: 2,593 Bytes
c53a8c6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
import gradio as gr
from typing import Dict
# from src.application.services import InterviewAnalyzer
# from src.infrastructure.llm import LangchainService
# from src.infrastructure.emotion import DeepFaceService
# from src.infrastructure.speech import GoogleSpeechService
# class GradioInterface:
# def __init__(self):
# # Initialize services
# self.emotion_service = DeepFaceService()
# self.speech_service = GoogleSpeechService()
# self.llm_service = LangchainService()
#
# # Initialize analyzer
# self.analyzer = InterviewAnalyzer(
# emotion_service=self.emotion_service,
# speech_service=self.speech_service,
# llm_service=self.llm_service,
# )
#
# def create_interface(self) -> gr.Interface:
# def process_submission(
# video_file: str, resume_file: str, job_requirements: str
# ) -> Dict:
# # Implementation for processing submission
# pass
#
# # Create Gradio interface
# interface = gr.Interface(
# fn=process_submission,
# inputs=[
# gr.Video(label="Interview Recording"),
# gr.File(label="Resume"),
# gr.Textbox(label="Job Requirements", lines=5),
# ],
# outputs=gr.JSON(label="Analysis Results"),
# title="HR Interview Analysis System",
# description="Upload interview recording and resume to analyze candidate performance",
# )
#
# return interface
# Testing to setup the simple interface
class GradioInterface:
def create_interface(self) -> gr.Interface:
def process_submission(
video_file: str, resume_file: str, job_requirements: str
) -> Dict:
# Implementation for processing submission
pass
# Create Gradio interface
interface = gr.Interface(
fn=process_submission,
inputs=[
gr.Video(label="Interview Recording"),
gr.File(label="Resume"),
gr.Textbox(label="Job Requirements", lines=5),
],
outputs=gr.JSON(label="Analysis Results"),
title="HR Interview Analysis System",
description="Upload interview recording and resume to analyze candidate performance",
)
return interface
def launch_app():
print(gr.__version__)
app = GradioInterface()
interface = app.create_interface()
interface.launch()
if __name__ == "__main__":
launch_app()
|