Spaces:
Runtime error
Runtime error
revert to regular chatbot code
Browse files
app.py
CHANGED
|
@@ -38,13 +38,6 @@ I am your Advanced Corp Val AI Coach. I'm here to help you with your final refle
|
|
| 38 |
#model = "gpt-3.5-turbo" # free and fast
|
| 39 |
#model = "gpt-4" # latest and greatest, not yet available
|
| 40 |
|
| 41 |
-
# to export chat history
|
| 42 |
-
def save_as_txt(chatbot, filename = 'chat_dialogue.txt'):
|
| 43 |
-
chatbot = list_to_str(chatbot)
|
| 44 |
-
with open(filename, 'w') as file:
|
| 45 |
-
file.write(chatbot)
|
| 46 |
-
files.download(filename)
|
| 47 |
-
|
| 48 |
def CustomChatGPT(message, history):
|
| 49 |
history_openai_format = [{"role": "system", "content": sys_message}]
|
| 50 |
for human, assistant in history:
|
|
@@ -68,7 +61,6 @@ def CustomChatGPT(message, history):
|
|
| 68 |
gradio.ChatInterface(fn=CustomChatGPT,
|
| 69 |
theme = 'gradio/soft',
|
| 70 |
title = "Advanced Corp Val AI Coach",
|
| 71 |
-
additional_inputs=[gradio.Button("TXT").click(save_as_txt, chatbot, None)],
|
| 72 |
description = des).queue().launch()
|
| 73 |
|
| 74 |
|
|
|
|
| 38 |
#model = "gpt-3.5-turbo" # free and fast
|
| 39 |
#model = "gpt-4" # latest and greatest, not yet available
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
def CustomChatGPT(message, history):
|
| 42 |
history_openai_format = [{"role": "system", "content": sys_message}]
|
| 43 |
for human, assistant in history:
|
|
|
|
| 61 |
gradio.ChatInterface(fn=CustomChatGPT,
|
| 62 |
theme = 'gradio/soft',
|
| 63 |
title = "Advanced Corp Val AI Coach",
|
|
|
|
| 64 |
description = des).queue().launch()
|
| 65 |
|
| 66 |
|