Update app.py
Browse files
app.py
CHANGED
|
@@ -37,18 +37,16 @@ with open('categories.json', 'r') as file:
|
|
| 37 |
choices = {}
|
| 38 |
|
| 39 |
for category, options in categories.items():
|
| 40 |
-
choice = gr.
|
| 41 |
choices[category] = choice
|
| 42 |
|
| 43 |
-
result_text = gr.
|
| 44 |
|
| 45 |
iface = gr.Interface(
|
| 46 |
fn=generate_prompt_interface,
|
| 47 |
inputs=list(choices.values()),
|
| 48 |
-
outputs=result_text
|
| 49 |
-
|
| 50 |
-
description="Generate a prompt by selecting options from the dropdown menus.",
|
| 51 |
-
theme="compact"
|
| 52 |
)
|
| 53 |
|
| 54 |
iface.launch()
|
|
|
|
| 37 |
choices = {}
|
| 38 |
|
| 39 |
for category, options in categories.items():
|
| 40 |
+
choice = gr.Dropdown(choices=["random", "none"] + options['random'], label=category, type="value")
|
| 41 |
choices[category] = choice
|
| 42 |
|
| 43 |
+
result_text = gr.Textbox()
|
| 44 |
|
| 45 |
iface = gr.Interface(
|
| 46 |
fn=generate_prompt_interface,
|
| 47 |
inputs=list(choices.values()),
|
| 48 |
+
outputs=result_text
|
| 49 |
+
|
|
|
|
|
|
|
| 50 |
)
|
| 51 |
|
| 52 |
iface.launch()
|