Spaces:
Sleeping
Sleeping
fixed bug with generate and random buttons
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ with gr.Blocks() as demo:
|
|
| 15 |
text_in = gr.Textbox(label="What npc do you need?")
|
| 16 |
with gr.Column(scale = 0):
|
| 17 |
btn = gr.Button("Generate")
|
| 18 |
-
|
| 19 |
|
| 20 |
with gr.Row():
|
| 21 |
|
|
@@ -31,6 +31,7 @@ with gr.Blocks() as demo:
|
|
| 31 |
text_out1 = gr.Textbox(label = "Description")
|
| 32 |
text_out2 = gr.Textbox(label = "Backstory")
|
| 33 |
btn.click(fn = char_description,inputs = text_in, outputs = [text_out1, text_out2])
|
|
|
|
| 34 |
|
| 35 |
|
| 36 |
with gr.Column(scale = 0):
|
|
|
|
| 15 |
text_in = gr.Textbox(label="What npc do you need?")
|
| 16 |
with gr.Column(scale = 0):
|
| 17 |
btn = gr.Button("Generate")
|
| 18 |
+
rand = gr.Button("Random")
|
| 19 |
|
| 20 |
with gr.Row():
|
| 21 |
|
|
|
|
| 31 |
text_out1 = gr.Textbox(label = "Description")
|
| 32 |
text_out2 = gr.Textbox(label = "Backstory")
|
| 33 |
btn.click(fn = char_description,inputs = text_in, outputs = [text_out1, text_out2])
|
| 34 |
+
rand.click(fn = char_description,inputs = "random", outputs = [text_out1, text_out2])
|
| 35 |
|
| 36 |
|
| 37 |
with gr.Column(scale = 0):
|