gokaygokay commited on
Commit
e22615e
1 Parent(s): 7cc05e2
Files changed (1) hide show
  1. ui_components.py +18 -17
ui_components.py CHANGED
@@ -109,24 +109,25 @@ def create_interface():
109
  label="Compression Level",
110
  value="hard"
111
  )
112
- prompt_type = gr.Dropdown(
113
- choices=["happy", "simple", "poster", "only_objects", "no_figure", "landscape", "fantasy"],
114
- label="Prompt Type",
115
- value="happy",
116
- interactive=True
117
- )
118
-
119
- # Add the missing update_prompt_type function
120
- def update_prompt_type(value):
121
- global selected_prompt_type
122
- selected_prompt_type = value
123
- print(f"Updated prompt type: {selected_prompt_type}")
124
- return value
125
-
126
- # Connect the update_prompt_type function to the prompt_type dropdown
127
- prompt_type.change(update_prompt_type, inputs=[prompt_type], outputs=[prompt_type])
128
-
129
  custom_base_prompt = gr.Textbox(label="Custom Base Prompt", lines=5)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
 
131
  # Add new components for LLM provider selection
132
  llm_provider = gr.Dropdown(
 
109
  label="Compression Level",
110
  value="hard"
111
  )
112
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  custom_base_prompt = gr.Textbox(label="Custom Base Prompt", lines=5)
114
+
115
+ prompt_type = gr.Dropdown(
116
+ choices=["happy", "simple", "poster", "only_objects", "no_figure", "landscape", "fantasy"],
117
+ label="Prompt Type",
118
+ value="happy",
119
+ interactive=True
120
+ )
121
+
122
+ # Add the missing update_prompt_type function
123
+ def update_prompt_type(value):
124
+ global selected_prompt_type
125
+ selected_prompt_type = value
126
+ print(f"Updated prompt type: {selected_prompt_type}")
127
+ return value
128
+
129
+ # Connect the update_prompt_type function to the prompt_type dropdown
130
+ prompt_type.change(update_prompt_type, inputs=[prompt_type], outputs=[prompt_type])
131
 
132
  # Add new components for LLM provider selection
133
  llm_provider = gr.Dropdown(