radames commited on
Commit
c825b73
1 Parent(s): 1acd386

update to gradio 3

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +8 -8
  3. requirements.txt +1 -1
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🧊
4
  colorFrom: blue
5
  colorTo: red
6
  sdk: gradio
7
- sdk_version: 2.9.4
8
  app_file: app.py
9
  pinned: false
10
  ---
 
4
  colorFrom: blue
5
  colorTo: red
6
  sdk: gradio
7
+ sdk_version: 3.0b8
8
  app_file: app.py
9
  pinned: false
10
  ---
app.py CHANGED
@@ -106,19 +106,19 @@ examples = [["examples/" + img, 10] for img in os.listdir("examples/")]
106
 
107
  iface = gr.Interface(fn=process_image,
108
  inputs=[
109
- gr.inputs.Image(
110
  type="filepath", label="Input Image"),
111
- gr.inputs.Slider(
112
- 5, 100, step=1, label="Voxel Size", default=10)
113
  ],
114
  outputs=[
115
- gr.outputs.Image(label="predicted depth", type="pil"),
116
- gr.outputs.Image3D(label="3d mesh reconstruction", clear_color=[
117
  1.0, 1.0, 1.0, 1.0]),
118
- gr.outputs.File(label="3d gLTF")
119
  ],
120
  title=title,
121
  description=description,
122
  examples=examples,
123
- allow_flagging="never")
124
- iface.launch(debug=True, enable_queue=False, cache_examples=True)
 
 
106
 
107
  iface = gr.Interface(fn=process_image,
108
  inputs=[
109
+ gr.Image(
110
  type="filepath", label="Input Image"),
111
+ gr.Slider(value=10, minimum=5, maximum=100, step=1, label="Voxel Size",)
 
112
  ],
113
  outputs=[
114
+ gr.Image(label="predicted depth", type="pil"),
115
+ gr.Model3D(label="3d mesh reconstruction", clear_color=[
116
  1.0, 1.0, 1.0, 1.0]),
117
+ gr.File(label="3d gLTF")
118
  ],
119
  title=title,
120
  description=description,
121
  examples=examples,
122
+ allow_flagging="never",
123
+ cache_examples=True)
124
+ iface.launch(debug=True)
requirements.txt CHANGED
@@ -2,7 +2,7 @@ torch
2
  git+https://github.com/nielsrogge/transformers.git@add_dpt_redesign#egg=transformers
3
  numpy
4
  Pillow
5
- gradio>=2.9.4
6
  jinja2
7
  open3d
8
  transformers
 
2
  git+https://github.com/nielsrogge/transformers.git@add_dpt_redesign#egg=transformers
3
  numpy
4
  Pillow
5
+ gradio==3.0b8
6
  jinja2
7
  open3d
8
  transformers