Spaces:
Sleeping
Sleeping
Commit
·
cf72988
1
Parent(s):
e7bb9a4
Fixed code box bug
Browse files- ui/coding.py +5 -3
ui/coding.py
CHANGED
|
@@ -25,11 +25,13 @@ def get_problem_solving_ui(llm, tts, stt, default_audio_params, audio_output, na
|
|
| 25 |
allow_custom_value=True,
|
| 26 |
)
|
| 27 |
with gr.Row():
|
|
|
|
|
|
|
| 28 |
gr.Markdown("Topic (can type custom value)")
|
| 29 |
topic_select = gr.Dropdown(
|
| 30 |
label="Select topic",
|
| 31 |
-
choices=
|
| 32 |
-
value=
|
| 33 |
container=False,
|
| 34 |
allow_custom_value=True,
|
| 35 |
)
|
|
@@ -42,7 +44,7 @@ def get_problem_solving_ui(llm, tts, stt, default_audio_params, audio_output, na
|
|
| 42 |
with gr.Accordion("Solution", open=False) as solution_acc:
|
| 43 |
with gr.Row() as content:
|
| 44 |
with gr.Column(scale=2):
|
| 45 |
-
if interview_type == "coding":
|
| 46 |
code = gr.Code(
|
| 47 |
label="Please write your code here. You can use any language, but only Python syntax highlighting is available.",
|
| 48 |
language="python",
|
|
|
|
| 25 |
allow_custom_value=True,
|
| 26 |
)
|
| 27 |
with gr.Row():
|
| 28 |
+
topics = topic_lists[interview_type.value].copy()
|
| 29 |
+
np.random.shuffle(topics)
|
| 30 |
gr.Markdown("Topic (can type custom value)")
|
| 31 |
topic_select = gr.Dropdown(
|
| 32 |
label="Select topic",
|
| 33 |
+
choices=topics,
|
| 34 |
+
value=topics[0],
|
| 35 |
container=False,
|
| 36 |
allow_custom_value=True,
|
| 37 |
)
|
|
|
|
| 44 |
with gr.Accordion("Solution", open=False) as solution_acc:
|
| 45 |
with gr.Row() as content:
|
| 46 |
with gr.Column(scale=2):
|
| 47 |
+
if interview_type.value == "coding":
|
| 48 |
code = gr.Code(
|
| 49 |
label="Please write your code here. You can use any language, but only Python syntax highlighting is available.",
|
| 50 |
language="python",
|