Update app.py
Browse files
app.py
CHANGED
|
@@ -77,7 +77,6 @@ theme = gr.themes.Base(
|
|
| 77 |
|
| 78 |
with gr.Blocks(theme=theme) as chatbot:
|
| 79 |
# gr.HTML(google_font_link)
|
| 80 |
-
with gr.Tab("Step 1"):
|
| 81 |
with gr.Row():
|
| 82 |
gr.Image(
|
| 83 |
value="logo.png",
|
|
@@ -86,30 +85,31 @@ with gr.Blocks(theme=theme) as chatbot:
|
|
| 86 |
show_download_button=False
|
| 87 |
)
|
| 88 |
with gr.Row():
|
|
|
|
|
|
|
|
|
|
| 89 |
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
examples=None
|
| 113 |
-
)
|
| 114 |
|
| 115 |
chatbot.launch()
|
|
|
|
| 77 |
|
| 78 |
with gr.Blocks(theme=theme) as chatbot:
|
| 79 |
# gr.HTML(google_font_link)
|
|
|
|
| 80 |
with gr.Row():
|
| 81 |
gr.Image(
|
| 82 |
value="logo.png",
|
|
|
|
| 85 |
show_download_button=False
|
| 86 |
)
|
| 87 |
with gr.Row():
|
| 88 |
+
with gr.Tab("Step 1"):
|
| 89 |
+
|
| 90 |
+
with gr.Column(scale=1):
|
| 91 |
|
| 92 |
+
gr.Markdown(""" # Tell me what you are looking for in your character if you have any preferences""")
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
character_name = gr.Textbox(label = "Character Name", placeholder="Type your name here…", info ="optional")
|
| 96 |
+
character_class = gr.Dropdown(['Barbarian', 'Bard', 'Cleric', 'Druid', 'Fighter', 'Monk', 'Paladin', 'Ranger', 'Rogue', 'Sorcerer', 'Warlock', 'Wizard'], label="Character Class", info="Choose one or more", multiselect=True)
|
| 97 |
+
character_race = gr.Dropdown([
|
| 98 |
+
"Aarakocra", "Aasimar", "Bugbear", "Centaur", "Changeling", "Dragonborn", "Dwarf", "Elf",
|
| 99 |
+
"Fairy", "Firbolg", "Genasi", "Githyanki", "Githzerai", "Gnome", "Goblin", "Goliath",
|
| 100 |
+
"Half-Elf", "Half-Orc", "Halfling", "Hobgoblin", "Human", "Kenku", "Kobold", "Leonin",
|
| 101 |
+
"Lizardfolk", "Minotaur", "Orc", "Owlin", "Satyr", "Shadar-kai", "Shifter", "Tabaxi",
|
| 102 |
+
"Tiefling", "Tortle", "Triton", "Warforged", "Yuan-ti"
|
| 103 |
+
], multiselect=True, label="Character Race", info="You can choose multiple")
|
| 104 |
+
character_alignment = gr.Dropdown(["Lawful Good", "Neutral Good", "Chaotic Good", "Lawful Neutral", "True Neutral", "Chaotic Neutral", "Lawful Evil", "Neutral Evil", "Chaotic Evil"], label="Character Alignment", elem_classes="alignment_radio")
|
| 105 |
+
|
| 106 |
+
with gr.Tab("Step 2"):
|
| 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()
|