Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -80,6 +80,7 @@ CLASS_MAP = {0: 'chair',
|
|
| 80 |
9: 'table'}
|
| 81 |
|
| 82 |
def infer(img_path):
|
|
|
|
| 83 |
mesh = trimesh.load(img_path.name)
|
| 84 |
points = mesh.sample(2048)
|
| 85 |
points = np.expand_dims(np.asarray(points), axis=0)
|
|
@@ -98,7 +99,7 @@ def infer(img_path):
|
|
| 98 |
return plt.gcf()
|
| 99 |
|
| 100 |
# get the inputs
|
| 101 |
-
inputs = gr.File()
|
| 102 |
|
| 103 |
# the app outputs two segmented images
|
| 104 |
output = gr.Plot()
|
|
|
|
| 80 |
9: 'table'}
|
| 81 |
|
| 82 |
def infer(img_path):
|
| 83 |
+
print(img_path.name)
|
| 84 |
mesh = trimesh.load(img_path.name)
|
| 85 |
points = mesh.sample(2048)
|
| 86 |
points = np.expand_dims(np.asarray(points), axis=0)
|
|
|
|
| 99 |
return plt.gcf()
|
| 100 |
|
| 101 |
# get the inputs
|
| 102 |
+
inputs = gr.File(type = 'file')
|
| 103 |
|
| 104 |
# the app outputs two segmented images
|
| 105 |
output = gr.Plot()
|