Spaces:
Build error
Build error
Commit
·
940cc74
1
Parent(s):
8ddef28
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,6 +56,12 @@ with gr.Blocks() as demo:
|
|
| 56 |
fn = get_tutor_reply, inputs = [study_tutor], outputs = [user_chat_input, chatbot, study_tutor], queue=True
|
| 57 |
)
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
# Download conversation history file
|
| 60 |
with gr.Blocks():
|
| 61 |
gr.Markdown("""
|
|
@@ -73,12 +79,6 @@ with gr.Blocks() as demo:
|
|
| 73 |
export_dialogue_button_txt.click(save_txt, study_tutor, file_download, show_progress=True)
|
| 74 |
export_dialogue_button_csv.click(save_csv, study_tutor, file_download, show_progress=True)
|
| 75 |
|
| 76 |
-
# Testing the chat history storage, can be deleted at deployment
|
| 77 |
-
with gr.Blocks():
|
| 78 |
-
test_btn = gr.Button("View your chat history")
|
| 79 |
-
chat_history = gr.JSON(label = "conversation history")
|
| 80 |
-
test_btn.click(get_conversation_history, inputs=[study_tutor], outputs=[chat_history, study_tutor])
|
| 81 |
-
|
| 82 |
# Instructor interface
|
| 83 |
with gr.Tab("Instructor Only"):
|
| 84 |
"""
|
|
|
|
| 56 |
fn = get_tutor_reply, inputs = [study_tutor], outputs = [user_chat_input, chatbot, study_tutor], queue=True
|
| 57 |
)
|
| 58 |
|
| 59 |
+
# Testing the chat history storage, can be deleted at deployment
|
| 60 |
+
with gr.Blocks():
|
| 61 |
+
test_btn = gr.Button("View your chat history")
|
| 62 |
+
chat_history = gr.JSON(label = "conversation history")
|
| 63 |
+
test_btn.click(get_conversation_history, inputs=[study_tutor], outputs=[chat_history, study_tutor])
|
| 64 |
+
|
| 65 |
# Download conversation history file
|
| 66 |
with gr.Blocks():
|
| 67 |
gr.Markdown("""
|
|
|
|
| 79 |
export_dialogue_button_txt.click(save_txt, study_tutor, file_download, show_progress=True)
|
| 80 |
export_dialogue_button_csv.click(save_csv, study_tutor, file_download, show_progress=True)
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
# Instructor interface
|
| 83 |
with gr.Tab("Instructor Only"):
|
| 84 |
"""
|