fffiloni commited on
Commit
7c7e1d8
1 Parent(s): a3ed1e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -57
app.py CHANGED
@@ -217,83 +217,59 @@ with gr.Blocks(css=css) as demo:
217
 
218
  #print(model_names)
219
 
220
- with gr.Row():
221
 
222
- with gr.Column():
223
-
 
224
  lora_1_id = gr.Dropdown(
225
  label = "LoRa 1 ID",
226
  choices = model_names,
227
  allow_custom_value = True
228
  #placeholder = "username/model_id"
229
  )
230
-
231
- lora_1_sfts = gr.Dropdown(
232
- label = "Safetensors file",
233
- visible=False
234
  )
 
 
 
 
 
235
 
236
- instance_prompt_1 = gr.Textbox(
237
- label = "Trigger Word 1",
238
- visible = False,
239
- interactive = False
240
- )
241
 
242
- with gr.Column():
243
-
 
244
  lora_2_id = gr.Dropdown(
245
  label = "LoRa 2 ID",
246
  choices = model_names,
247
  allow_custom_value = True
248
  #placeholder = "username/model_id"
249
  )
250
-
251
- lora_2_sfts = gr.Dropdown(
252
- label = "Safetensors file",
253
- visible=False
254
- )
255
-
256
- instance_prompt_2 = gr.Textbox(
257
- label = "Trigger Word 2",
258
- visible = False,
259
- interactive = False
260
- )
261
- else:
262
- with gr.Row():
263
-
264
- with gr.Column():
265
- lora_1_id = gr.Textbox(
266
- label = "LoRa 1 ID",
267
  placeholder = "username/model_id"
268
  )
269
-
270
- lora_1_sfts = gr.Dropdown(
271
- label = "Safetensors file",
272
- visible=False
273
- )
274
-
275
- instance_prompt_1 = gr.Textbox(
276
- label = "Trigger Word 1",
277
- visible = False,
278
- interactive = False
279
- )
280
-
281
- with gr.Column():
282
- lora_2_id = gr.Textbox(
283
- label = "LoRa 2 ID",
284
- placeholder = "username/model_id"
285
- )
286
 
287
- lora_2_sfts = gr.Dropdown(
288
- label = "Safetensors file",
289
- visible=False
290
- )
291
 
292
- instance_prompt_2 = gr.Textbox(
293
- label = "Trigger Word 2",
294
- visible = False,
295
- interactive = False
296
- )
297
 
298
  load_models_btn = gr.Button("1. Load models and .safetensors")
299
 
 
217
 
218
  #print(model_names)
219
 
220
+ with gr.Row():
221
 
222
+ with gr.Column():
223
+
224
+ if not is_shared_ui:
225
  lora_1_id = gr.Dropdown(
226
  label = "LoRa 1 ID",
227
  choices = model_names,
228
  allow_custom_value = True
229
  #placeholder = "username/model_id"
230
  )
231
+ else:
232
+ lora_1_id = gr.Textbox(
233
+ label = "LoRa 1 ID",
234
+ placeholder = "username/model_id"
235
  )
236
+
237
+ lora_1_sfts = gr.Dropdown(
238
+ label = "Safetensors file",
239
+ visible=False
240
+ )
241
 
242
+ instance_prompt_1 = gr.Textbox(
243
+ label = "Trigger Word 1",
244
+ visible = False,
245
+ interactive = False
246
+ )
247
 
248
+ with gr.Column():
249
+
250
+ if not is_shared_ui:
251
  lora_2_id = gr.Dropdown(
252
  label = "LoRa 2 ID",
253
  choices = model_names,
254
  allow_custom_value = True
255
  #placeholder = "username/model_id"
256
  )
257
+ else:
258
+ lora_2_id = gr.Textbox(
259
+ label = "LoRa 2 ID",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  placeholder = "username/model_id"
261
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
 
263
+ lora_2_sfts = gr.Dropdown(
264
+ label = "Safetensors file",
265
+ visible=False
266
+ )
267
 
268
+ instance_prompt_2 = gr.Textbox(
269
+ label = "Trigger Word 2",
270
+ visible = False,
271
+ interactive = False
272
+ )
273
 
274
  load_models_btn = gr.Button("1. Load models and .safetensors")
275