update to gradio 3
Browse files- README.md +1 -1
- app.py +8 -8
- requirements.txt +1 -1
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 🧊
|
|
4 |
colorFrom: blue
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
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.
|
110 |
type="filepath", label="Input Image"),
|
111 |
-
gr.
|
112 |
-
5, 100, step=1, label="Voxel Size", default=10)
|
113 |
],
|
114 |
outputs=[
|
115 |
-
gr.
|
116 |
-
gr.
|
117 |
1.0, 1.0, 1.0, 1.0]),
|
118 |
-
gr.
|
119 |
],
|
120 |
title=title,
|
121 |
description=description,
|
122 |
examples=examples,
|
123 |
-
allow_flagging="never"
|
124 |
-
|
|
|
|
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
|
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
|