demetz commited on
Commit
7d6ab69
·
verified ·
1 Parent(s): ce49c48

Update app.py

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