Spaces:
Build error
Build error
Commit
·
1d2e1a7
1
Parent(s):
f3685f7
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,8 @@ import gradio as gr
|
|
| 2 |
import pandas as pd
|
| 3 |
from functools import partial
|
| 4 |
|
|
|
|
|
|
|
| 5 |
def save_chatbot_dialogue(chat_tutor, save_type):
|
| 6 |
|
| 7 |
formatted_convo = pd.DataFrame(chat_tutor.conversation_memory, columns=['user', 'chatbot'])
|
|
@@ -88,7 +90,7 @@ with gr.Blocks() as demo:
|
|
| 88 |
|
| 89 |
# Testing purpose
|
| 90 |
test_btn = gr.Button("View your chat history")
|
| 91 |
-
chat_history = gr.
|
| 92 |
test_btn.click(get_conversation_history, inputs=[study_tutor], outputs=[chat_history, study_tutor])
|
| 93 |
|
| 94 |
with gr.Blocks():
|
|
|
|
| 2 |
import pandas as pd
|
| 3 |
from functools import partial
|
| 4 |
|
| 5 |
+
import os
|
| 6 |
+
|
| 7 |
def save_chatbot_dialogue(chat_tutor, save_type):
|
| 8 |
|
| 9 |
formatted_convo = pd.DataFrame(chat_tutor.conversation_memory, columns=['user', 'chatbot'])
|
|
|
|
| 90 |
|
| 91 |
# Testing purpose
|
| 92 |
test_btn = gr.Button("View your chat history")
|
| 93 |
+
chat_history = gr.JSON(label = "conversation history")
|
| 94 |
test_btn.click(get_conversation_history, inputs=[study_tutor], outputs=[chat_history, study_tutor])
|
| 95 |
|
| 96 |
with gr.Blocks():
|