fffiloni commited on
Commit
5d917f0
1 Parent(s): 975dcb7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -33,6 +33,7 @@ controlnet_lineart = ControlNetModel.from_pretrained(
33
  "fffiloni/cn_malgras_test_11",
34
  torch_dtype=torch.float16,
35
  variant="fp16",
 
36
  )
37
 
38
  def check_use_custom_or_no(value):
@@ -204,7 +205,8 @@ def infer(use_custom_model, model_name, weight_name, custom_lora_weight, image_i
204
 
205
  images[0].save(f"result.png")
206
 
207
- return f"result.png", seed
 
208
 
209
  css="""
210
  #col-container{
@@ -347,7 +349,7 @@ with gr.Blocks(css=css) as demo:
347
 
348
  submit_btn = gr.Button("Submit")
349
 
350
- result = gr.Image(label="Result")
351
 
352
  use_custom_model.change(
353
  fn = check_use_custom_or_no,
 
33
  "fffiloni/cn_malgras_test_11",
34
  torch_dtype=torch.float16,
35
  variant="fp16",
36
+ token=hf_token
37
  )
38
 
39
  def check_use_custom_or_no(value):
 
205
 
206
  images[0].save(f"result.png")
207
 
208
+ #return f"result.png", seed
209
+ return [image] + images[0], seed
210
 
211
  css="""
212
  #col-container{
 
349
 
350
  submit_btn = gr.Button("Submit")
351
 
352
+ result = gr.Gallery(label="Result")
353
 
354
  use_custom_model.change(
355
  fn = check_use_custom_or_no,