gaur3009 commited on
Commit
bc97f92
·
verified ·
1 Parent(s): 6b0796a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -6,7 +6,7 @@ import numpy as np
6
  import gradio as gr
7
 
8
  # Load MiDaS model
9
- midas = torch.hub.load("intel-isl/MiDaS", "DPT_Large")
10
  midas.eval()
11
 
12
  # Preprocessing function
@@ -78,10 +78,10 @@ def process_images(image_a, image_b, design_bbox):
78
  result = fit_and_warp_design(image_a, image_b, design_bbox)
79
  return result
80
 
81
- # Gradio UI components
82
- image_input_a = gr.inputs.Image(label="Upload Clothing Image", type="pil")
83
- image_input_b = gr.inputs.Image(label="Upload Design Image", type="pil")
84
- design_bbox_input = gr.inputs.Image(tool="select", label="Adjust Design Position and Size")
85
 
86
  # Define the Gradio interface
87
  iface = gr.Interface(
 
6
  import gradio as gr
7
 
8
  # Load MiDaS model
9
+ midas = torch.hub.load("intel-isl/MiDaS", "DPT_Large", trust_repo=True)
10
  midas.eval()
11
 
12
  # Preprocessing function
 
78
  result = fit_and_warp_design(image_a, image_b, design_bbox)
79
  return result
80
 
81
+ # Gradio UI components using the updated syntax
82
+ image_input_a = gr.Image(label="Upload Clothing Image", type="pil")
83
+ image_input_b = gr.Image(label="Upload Design Image", type="pil")
84
+ design_bbox_input = gr.Image(tool="select", label="Adjust Design Position and Size")
85
 
86
  # Define the Gradio interface
87
  iface = gr.Interface(