jinggujiwoo7
commited on
Commit
β’
b063edc
1
Parent(s):
17411ab
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ comments = {}
|
|
7 |
|
8 |
# μ μλμ μ§λ¬Έ μ
λ ₯ λ°κΈ°
|
9 |
def teacher_question(question):
|
10 |
-
return question
|
11 |
|
12 |
# νμλ€μ μμ± λ
Ήμ λ° μ μ₯
|
13 |
def record_student_voice(student_name, question, voice):
|
@@ -57,8 +57,6 @@ with gr.Blocks() as demo:
|
|
57 |
output_voice = gr.Textbox(label="Status")
|
58 |
submit_voice.click(record_student_voice, inputs=[student_name_input, state_question, voice_input], outputs=output_voice)
|
59 |
|
60 |
-
gr.Textbox.update(question_display, value=state_question)
|
61 |
-
|
62 |
with gr.Tab("List Voices"):
|
63 |
question_list_input = gr.Textbox(placeholder="Question", label="Enter question to list recordings")
|
64 |
submit_list = gr.Button("Get Recordings")
|
@@ -68,7 +66,6 @@ with gr.Blocks() as demo:
|
|
68 |
with gr.Tab("Play Voice"):
|
69 |
recording_select = gr.Dropdown(label="Select a recording to play")
|
70 |
play_audio = gr.Audio(type="filepath", label="Recorded Voice")
|
71 |
-
recordings_list.change(lambda x: x, inputs=recordings_list, outputs=recording_select)
|
72 |
recording_select.change(lambda x: x, inputs=recording_select, outputs=play_audio)
|
73 |
|
74 |
with gr.Tab("Write Comment"):
|
@@ -78,4 +75,6 @@ with gr.Blocks() as demo:
|
|
78 |
output_comment = gr.Textbox(label="Status")
|
79 |
submit_comment.click(write_comment, inputs=[comment_question_input, comment_input], outputs=output_comment)
|
80 |
|
|
|
|
|
81 |
demo.launch()
|
|
|
7 |
|
8 |
# μ μλμ μ§λ¬Έ μ
λ ₯ λ°κΈ°
|
9 |
def teacher_question(question):
|
10 |
+
return question
|
11 |
|
12 |
# νμλ€μ μμ± λ
Ήμ λ° μ μ₯
|
13 |
def record_student_voice(student_name, question, voice):
|
|
|
57 |
output_voice = gr.Textbox(label="Status")
|
58 |
submit_voice.click(record_student_voice, inputs=[student_name_input, state_question, voice_input], outputs=output_voice)
|
59 |
|
|
|
|
|
60 |
with gr.Tab("List Voices"):
|
61 |
question_list_input = gr.Textbox(placeholder="Question", label="Enter question to list recordings")
|
62 |
submit_list = gr.Button("Get Recordings")
|
|
|
66 |
with gr.Tab("Play Voice"):
|
67 |
recording_select = gr.Dropdown(label="Select a recording to play")
|
68 |
play_audio = gr.Audio(type="filepath", label="Recorded Voice")
|
|
|
69 |
recording_select.change(lambda x: x, inputs=recording_select, outputs=play_audio)
|
70 |
|
71 |
with gr.Tab("Write Comment"):
|
|
|
75 |
output_comment = gr.Textbox(label="Status")
|
76 |
submit_comment.click(write_comment, inputs=[comment_question_input, comment_input], outputs=output_comment)
|
77 |
|
78 |
+
demo.load(lambda: gr.update(value=state_question), outputs=question_display)
|
79 |
+
|
80 |
demo.launch()
|