terrapretapermaculture commited on
Commit
817e0d9
β€’
1 Parent(s): 56b5575

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -1
app.py CHANGED
@@ -24,8 +24,27 @@ with gr.Blocks(css="style.css") as demo:
24
  visible=SHOW_DUPLICATE_BUTTON,
25
  )
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  interfaces = [
28
- gr.Interface(fn=model.process_depth, inputs=[], outputs=[], live=False),
29
  ]
30
 
31
  gr.TabbedInterface(interface_list=interfaces, tab_names=["Depth"])
 
24
  visible=SHOW_DUPLICATE_BUTTON,
25
  )
26
 
27
+ # Define the inputs and outputs for the interface
28
+ depth_inputs = [
29
+ gr.Image(type="numpy", label="Input Image"),
30
+ gr.Textbox(label="Prompt"),
31
+ gr.Textbox(label="Additional Prompt"),
32
+ gr.Textbox(label="Negative Prompt"),
33
+ gr.Slider(label="Number of Images", minimum=1, maximum=10, step=1, value=1),
34
+ gr.Slider(label="Image Resolution", minimum=256, maximum=1024, step=256, value=512),
35
+ gr.Slider(label="Preprocess Resolution", minimum=128, maximum=512, step=1, value=384),
36
+ gr.Slider(label="Number of Steps", minimum=1, maximum=100, step=1, value=20),
37
+ gr.Slider(label="Guidance Scale", minimum=0.1, maximum=30.0, step=0.1, value=7.5),
38
+ gr.Slider(label="Seed", minimum=0, maximum=1000000, step=1, value=0),
39
+ gr.Radio(label="Preprocessor", choices=["Midas", "DPT", "None"], value="DPT"),
40
+ ]
41
+
42
+ depth_outputs = [
43
+ gr.Gallery(label="Output Images"),
44
+ ]
45
+
46
  interfaces = [
47
+ gr.Interface(fn=model.process_depth, inputs=depth_inputs, outputs=depth_outputs, live=False),
48
  ]
49
 
50
  gr.TabbedInterface(interface_list=interfaces, tab_names=["Depth"])