Spaces:
Runtime error
Runtime error
neverix
commited on
Commit
·
b9afc96
1
Parent(s):
2ddc005
Do it
Browse files
app.py
CHANGED
|
@@ -86,7 +86,7 @@ def make_mesh(pic, depth, pick_edges):
|
|
| 86 |
|
| 87 |
def args_to_mat(tx, ty, tz, rx, ry, rz):
|
| 88 |
mat = np.eye(4)
|
| 89 |
-
mat[:3, :3] = scipy.spatial.Rotation.from_euler("XYZ", (rx, ry, rz)).as_matrix()
|
| 90 |
mat[:3, 3] = tx, ty, tz
|
| 91 |
return mat
|
| 92 |
|
|
@@ -126,11 +126,11 @@ def main():
|
|
| 126 |
gr.inputs.Number(label="ry", default=0.0),
|
| 127 |
gr.inputs.Number(label="rz", default=0.0)
|
| 128 |
], outputs=[
|
| 129 |
-
gr.outputs.Image(type="numpy"),
|
| 130 |
-
gr.outputs.Image(type="numpy"),
|
| 131 |
-
gr.outputs.Video()
|
| 132 |
], title="DALL·E 6D", description="Lift DALL·E 2 (or any other model) into 3D!")
|
| 133 |
-
interface.launch()
|
| 134 |
|
| 135 |
|
| 136 |
if __name__ == '__main__':
|
|
|
|
| 86 |
|
| 87 |
def args_to_mat(tx, ty, tz, rx, ry, rz):
|
| 88 |
mat = np.eye(4)
|
| 89 |
+
mat[:3, :3] = scipy.spatial.transform.Rotation.from_euler("XYZ", (rx, ry, rz)).as_matrix()
|
| 90 |
mat[:3, 3] = tx, ty, tz
|
| 91 |
return mat
|
| 92 |
|
|
|
|
| 126 |
gr.inputs.Number(label="ry", default=0.0),
|
| 127 |
gr.inputs.Number(label="rz", default=0.0)
|
| 128 |
], outputs=[
|
| 129 |
+
gr.outputs.Image(type="numpy", label="result"),
|
| 130 |
+
gr.outputs.Image(type="numpy", label="depth"),
|
| 131 |
+
gr.outputs.Video(label="interpolated")
|
| 132 |
], title="DALL·E 6D", description="Lift DALL·E 2 (or any other model) into 3D!")
|
| 133 |
+
gr.TabbedInterface([interface], ["Warp 3D images"]).launch()
|
| 134 |
|
| 135 |
|
| 136 |
if __name__ == '__main__':
|