Update app.py
Browse files
app.py
CHANGED
@@ -80,17 +80,18 @@ with gr.Blocks(css=chat_css) as chatbot:
|
|
80 |
|
81 |
with gr.Column(scale=1):
|
82 |
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
86 |
with gr.Column(scale=1):
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
|
96 |
chatbot.launch()
|
|
|
80 |
|
81 |
with gr.Column(scale=1):
|
82 |
|
83 |
+
|
84 |
+
character_name = gr.Textbox(label = "Character Name", placeholder="Type your name here…", info ="optional")
|
85 |
+
character_class = gr.CheckboxGroup(['Barbarian', 'Bard', 'Cleric', 'Druid', 'Fighter', 'Monk', 'Paladin', 'Ranger', 'Rogue', 'Sorcerer', 'Warlock', 'Wizard'], label="Character Class", info="Choose one or more")
|
86 |
+
character_alignment = gr.Radio(["Lawful Good", "Neutral Good", "Chaotic Good", "Lawful Neutral", "True Neutral", "Chaotic Neutral", "Lawful Evil", "Neutral Evil", "Chaotic Evil"], elem_classes="alignment_radio")
|
87 |
with gr.Column(scale=1):
|
88 |
+
gr.ChatInterface(
|
89 |
+
fn=respond,
|
90 |
+
additional_inputs=[character_name, character_class, character_alignment], # Pass name into function!
|
91 |
+
type="messages",
|
92 |
+
examples=None,
|
93 |
+
title="Character Creator",
|
94 |
+
description="Welcome! Tell me what you want to create and we can make your character come to life!"
|
95 |
+
)
|
96 |
|
97 |
chatbot.launch()
|