Spaces:
Sleeping
Sleeping
IliaLarchenko
commited on
Commit
•
81629c5
1
Parent(s):
0d3a4f3
app.py refactoring
Browse files
app.py
CHANGED
@@ -24,26 +24,19 @@ if os.getenv("SILENT", False):
|
|
24 |
|
25 |
with gr.Blocks(title="AI Interviewer") as demo:
|
26 |
audio_output = gr.Audio(label="Play audio", autoplay=True, visible=os.environ.get("DEBUG", False), streaming=tts.streaming)
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
llm, tts, stt, default_audio_params, audio_output, name="ML Design (Beta)", interview_type="ml_design"
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
llm, tts, stt, default_audio_params, audio_output, name="
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
instructions_tab.render()
|
42 |
-
coding_tab.render()
|
43 |
-
ml_design_tab.render()
|
44 |
-
system_design_tab.render()
|
45 |
-
ml_theory_tab.render()
|
46 |
-
math_design_tab.render()
|
47 |
-
sql_design_tab.render()
|
48 |
|
49 |
demo.launch(show_api=False)
|
|
|
24 |
|
25 |
with gr.Blocks(title="AI Interviewer") as demo:
|
26 |
audio_output = gr.Audio(label="Play audio", autoplay=True, visible=os.environ.get("DEBUG", False), streaming=tts.streaming)
|
27 |
+
tabs = [
|
28 |
+
get_instructions_ui(llm, tts, stt, default_audio_params),
|
29 |
+
get_problem_solving_ui(llm, tts, stt, default_audio_params, audio_output, name="Coding", interview_type="coding"),
|
30 |
+
get_problem_solving_ui(llm, tts, stt, default_audio_params, audio_output, name="ML Design (Beta)", interview_type="ml_design"),
|
31 |
+
get_problem_solving_ui(llm, tts, stt, default_audio_params, audio_output, name="ML Theory (Beta)", interview_type="ml_theory"),
|
32 |
+
get_problem_solving_ui(
|
33 |
+
llm, tts, stt, default_audio_params, audio_output, name="System Design (Beta)", interview_type="system_design"
|
34 |
+
),
|
35 |
+
get_problem_solving_ui(llm, tts, stt, default_audio_params, audio_output, name="Math (Beta)", interview_type="math"),
|
36 |
+
get_problem_solving_ui(llm, tts, stt, default_audio_params, audio_output, name="SQL (Beta)", interview_type="sql"),
|
37 |
+
]
|
38 |
+
|
39 |
+
for tab in tabs:
|
40 |
+
tab.render()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
demo.launch(show_api=False)
|