brunhild217 commited on
Commit
0f8cdfc
·
1 Parent(s): 26dfd6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -52,11 +52,6 @@ with gr.Blocks() as demo:
52
  fn = get_tutor_reply, inputs = [study_tutor], outputs = [user_chat_input, chatbot, study_tutor], queue=True
53
  )
54
 
55
- # Testing the chat history storage, can be deleted at deployment
56
- test_btn = gr.Button("View your chat history")
57
- chat_history = gr.JSON(label = "conversation history")
58
- test_btn.click(get_conversation_history, inputs=[study_tutor], outputs=[chat_history, study_tutor])
59
-
60
  # Download conversation history file
61
  with gr.Blocks():
62
  gr.Markdown("""
@@ -74,6 +69,11 @@ with gr.Blocks() as demo:
74
  export_dialogue_button_txt.click(save_txt, study_tutor, file_download, show_progress=True)
75
  export_dialogue_button_csv.click(save_csv, study_tutor, file_download, show_progress=True)
76
 
 
 
 
 
 
77
  # Instructor interface
78
  with gr.Tab("Instructor Only"):
79
  """
@@ -119,7 +119,7 @@ with gr.Blocks() as demo:
119
  # and load it here to chain with the student interface
120
 
121
  # TODO: Currently, the instructor prompt is handled as text input and stored in the vector store (and in the learning objective),
122
- # which means the tutor now is still a question-answering tutor who viewed the prompt as context input.
123
  # We need to find a way to provide the prompt directly to the model and set its status.
124
 
125
  demo.queue().launch(server_name='0.0.0.0', server_port=7860)
 
52
  fn = get_tutor_reply, inputs = [study_tutor], outputs = [user_chat_input, chatbot, study_tutor], queue=True
53
  )
54
 
 
 
 
 
 
55
  # Download conversation history file
56
  with gr.Blocks():
57
  gr.Markdown("""
 
69
  export_dialogue_button_txt.click(save_txt, study_tutor, file_download, show_progress=True)
70
  export_dialogue_button_csv.click(save_csv, study_tutor, file_download, show_progress=True)
71
 
72
+ # Testing the chat history storage, can be deleted at deployment
73
+ test_btn = gr.Button("View your chat history")
74
+ chat_history = gr.JSON(label = "conversation history")
75
+ test_btn.click(get_conversation_history, inputs=[study_tutor], outputs=[chat_history, study_tutor])
76
+
77
  # Instructor interface
78
  with gr.Tab("Instructor Only"):
79
  """
 
119
  # and load it here to chain with the student interface
120
 
121
  # TODO: Currently, the instructor prompt is handled as text input and stored in the vector store (and in the learning objective),
122
+ # which means the tutor now is still a question-answering tutor who viewed the prompt as context (but not really acting based on it).
123
  # We need to find a way to provide the prompt directly to the model and set its status.
124
 
125
  demo.queue().launch(server_name='0.0.0.0', server_port=7860)