Update app.py
Browse files
app.py
CHANGED
@@ -69,7 +69,7 @@ def chatbot(input, messages):
|
|
69 |
ans = "My Race is ,I choose "+ getChooseClass(reply) +" as my class." + classAns
|
70 |
logging.info("ChooseClass:"+ans)
|
71 |
messages.append({"role": "assistant", "content": ans})
|
72 |
-
return reply, messages
|
73 |
|
74 |
def printMessages(messages):
|
75 |
delimiter = '\n'
|
@@ -78,6 +78,6 @@ def printMessages(messages):
|
|
78 |
return msg_string
|
79 |
|
80 |
app = gr.Interface(fn=chatbot, inputs=[gr.Textbox(lines=7, label="You ask and answer questions below"), "state"],
|
81 |
-
outputs=[gr.Textbox(label="DND Game Reply", placeholder=roleAns), "state"], title="DND Game",#, gr.Textbox(label="History"),
|
82 |
description="DND Game",theme="compact")
|
83 |
app.launch(share=False)
|
|
|
69 |
ans = "My Race is ,I choose "+ getChooseClass(reply) +" as my class." + classAns
|
70 |
logging.info("ChooseClass:"+ans)
|
71 |
messages.append({"role": "assistant", "content": ans})
|
72 |
+
return reply, printMessages(messages), messages
|
73 |
|
74 |
def printMessages(messages):
|
75 |
delimiter = '\n'
|
|
|
78 |
return msg_string
|
79 |
|
80 |
app = gr.Interface(fn=chatbot, inputs=[gr.Textbox(lines=7, label="You ask and answer questions below"), "state"],
|
81 |
+
outputs=[gr.Textbox(label="DND Game Reply", placeholder=roleAns), gr.Textbox(label="History"), "state"], title="DND Game",#, gr.Textbox(label="History"),
|
82 |
description="DND Game",theme="compact")
|
83 |
app.launch(share=False)
|