Fix: main.py to app.py
Browse files- main.py +0 -16
- src/{frontend/interface.py → app.py} +44 -17
main.py
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
# This is a sample Python script.
|
2 |
-
|
3 |
-
# Press ⌃R to execute it or replace it with your code.
|
4 |
-
# Press Double ⇧ to search everywhere for classes, files, tool windows, actions, and settings.
|
5 |
-
|
6 |
-
|
7 |
-
def print_hi(name):
|
8 |
-
# Use a breakpoint in the code line below to debug your script.
|
9 |
-
print(f"Hi, {name}") # Press ⌘F8 to toggle the breakpoint.
|
10 |
-
|
11 |
-
|
12 |
-
# Press the green button in the gutter to run the script.
|
13 |
-
if __name__ == "__main__":
|
14 |
-
print_hi("PyCharm")
|
15 |
-
|
16 |
-
# See PyCharm help at https://www.jetbrains.com/help/pycharm/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/{frontend/interface.py → app.py}
RENAMED
@@ -1,25 +1,51 @@
|
|
1 |
import gradio as gr
|
2 |
from typing import Dict
|
3 |
-
from src.application.services import InterviewAnalyzer
|
4 |
-
from src.infrastructure.llm import LangchainService
|
5 |
-
from src.infrastructure.emotion import DeepFaceService
|
6 |
-
from src.infrastructure.speech import GoogleSpeechService
|
7 |
|
|
|
|
|
|
|
|
|
8 |
|
9 |
-
class GradioInterface:
|
10 |
-
def __init__(self):
|
11 |
-
# Initialize services
|
12 |
-
self.emotion_service = DeepFaceService()
|
13 |
-
self.speech_service = GoogleSpeechService()
|
14 |
-
self.llm_service = LangchainService()
|
15 |
-
|
16 |
-
# Initialize analyzer
|
17 |
-
self.analyzer = InterviewAnalyzer(
|
18 |
-
emotion_service=self.emotion_service,
|
19 |
-
speech_service=self.speech_service,
|
20 |
-
llm_service=self.llm_service,
|
21 |
-
)
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
def create_interface(self) -> gr.Interface:
|
24 |
def process_submission(
|
25 |
video_file: str, resume_file: str, job_requirements: str
|
@@ -44,6 +70,7 @@ class GradioInterface:
|
|
44 |
|
45 |
|
46 |
def launch_app():
|
|
|
47 |
app = GradioInterface()
|
48 |
interface = app.create_interface()
|
49 |
interface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
from typing import Dict
|
|
|
|
|
|
|
|
|
3 |
|
4 |
+
# from src.application.services import InterviewAnalyzer
|
5 |
+
# from src.infrastructure.llm import LangchainService
|
6 |
+
# from src.infrastructure.emotion import DeepFaceService
|
7 |
+
# from src.infrastructure.speech import GoogleSpeechService
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
+
# class GradioInterface:
|
11 |
+
# def __init__(self):
|
12 |
+
# # Initialize services
|
13 |
+
# self.emotion_service = DeepFaceService()
|
14 |
+
# self.speech_service = GoogleSpeechService()
|
15 |
+
# self.llm_service = LangchainService()
|
16 |
+
#
|
17 |
+
# # Initialize analyzer
|
18 |
+
# self.analyzer = InterviewAnalyzer(
|
19 |
+
# emotion_service=self.emotion_service,
|
20 |
+
# speech_service=self.speech_service,
|
21 |
+
# llm_service=self.llm_service,
|
22 |
+
# )
|
23 |
+
#
|
24 |
+
# def create_interface(self) -> gr.Interface:
|
25 |
+
# def process_submission(
|
26 |
+
# video_file: str, resume_file: str, job_requirements: str
|
27 |
+
# ) -> Dict:
|
28 |
+
# # Implementation for processing submission
|
29 |
+
# pass
|
30 |
+
#
|
31 |
+
# # Create Gradio interface
|
32 |
+
# interface = gr.Interface(
|
33 |
+
# fn=process_submission,
|
34 |
+
# inputs=[
|
35 |
+
# gr.Video(label="Interview Recording"),
|
36 |
+
# gr.File(label="Resume"),
|
37 |
+
# gr.Textbox(label="Job Requirements", lines=5),
|
38 |
+
# ],
|
39 |
+
# outputs=gr.JSON(label="Analysis Results"),
|
40 |
+
# title="HR Interview Analysis System",
|
41 |
+
# description="Upload interview recording and resume to analyze candidate performance",
|
42 |
+
# )
|
43 |
+
#
|
44 |
+
# return interface
|
45 |
+
|
46 |
+
|
47 |
+
# Testing to setup the simple interface
|
48 |
+
class GradioInterface:
|
49 |
def create_interface(self) -> gr.Interface:
|
50 |
def process_submission(
|
51 |
video_file: str, resume_file: str, job_requirements: str
|
|
|
70 |
|
71 |
|
72 |
def launch_app():
|
73 |
+
print(gr.__version__)
|
74 |
app = GradioInterface()
|
75 |
interface = app.create_interface()
|
76 |
interface.launch()
|