Update app.py
Browse files
app.py
CHANGED
|
@@ -105,19 +105,11 @@ with gr.Blocks(theme=theme) as chatbot:
|
|
| 105 |
|
| 106 |
|
| 107 |
with gr.Column(scale=2):
|
| 108 |
-
|
| 109 |
fn=respond,
|
| 110 |
additional_inputs=[character_name, character_class, character_race, character_alignment], # Pass name into function!
|
| 111 |
type="messages",
|
| 112 |
examples=None
|
| 113 |
)
|
| 114 |
-
user_input = gr.Textbox(label="Your Message", placeholder="Type your message here…", lines=1)
|
| 115 |
-
send_button = gr.Button("Send")
|
| 116 |
-
|
| 117 |
-
send_button.click(
|
| 118 |
-
handle_message,
|
| 119 |
-
inputs=[user_input, state],
|
| 120 |
-
outputs=[chatbot_display, user_input]
|
| 121 |
-
)
|
| 122 |
|
| 123 |
chatbot.launch()
|
|
|
|
| 105 |
|
| 106 |
|
| 107 |
with gr.Column(scale=2):
|
| 108 |
+
gr.ChatInterface(
|
| 109 |
fn=respond,
|
| 110 |
additional_inputs=[character_name, character_class, character_race, character_alignment], # Pass name into function!
|
| 111 |
type="messages",
|
| 112 |
examples=None
|
| 113 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
chatbot.launch()
|