perler commited on
Commit
4800b6d
1 Parent(s): 3307a1b

more accurate vars in point cloud conversion

Browse files
Files changed (2) hide show
  1. __init__.py +0 -0
  2. app.py +10 -10
__init__.py ADDED
File without changes
app.py CHANGED
@@ -58,18 +58,18 @@ def main():
58
  Inference takes about 2 minutes.
59
  '''
60
 
61
- def convert_to_ply(input_point_cloud_upload: str):
62
 
63
  # add absolute path to import dirs
64
- import sys
65
- import os
66
- sys.path.append(os.path.abspath('ppsurf'))
67
-
68
- import os
69
- os.chdir('ppsurf')
70
 
71
  print('Inputs:', input_point_cloud_upload, type(input_point_cloud_upload))
72
- input_shape = input_point_cloud_upload
73
  if not input_shape.endswith('.ply'):
74
  # load file
75
  from ppsurf.source.occupancy_data_module import OccupancyDataModule
@@ -84,8 +84,8 @@ def main():
84
  print('ls\n', subprocess.check_output(['ls', os.path.dirname(input_shape)]))
85
 
86
  # show in viewer
87
- print(input_tabs)
88
- print(input_point_cloud_viewer)
89
  input_tabs.selected = 'pc_viewer'
90
  input_point_cloud_viewer.value = input_shape
91
 
 
58
  Inference takes about 2 minutes.
59
  '''
60
 
61
+ def convert_to_ply(input_point_cloud_upload: gr.utils.NamedString):
62
 
63
  # add absolute path to import dirs
64
+ # import sys
65
+ # import os
66
+ # sys.path.append(os.path.abspath('ppsurf'))
67
+ #
68
+ # import os
69
+ # os.chdir('ppsurf')
70
 
71
  print('Inputs:', input_point_cloud_upload, type(input_point_cloud_upload))
72
+ input_shape: str = input_point_cloud_upload.name
73
  if not input_shape.endswith('.ply'):
74
  # load file
75
  from ppsurf.source.occupancy_data_module import OccupancyDataModule
 
84
  print('ls\n', subprocess.check_output(['ls', os.path.dirname(input_shape)]))
85
 
86
  # show in viewer
87
+ print(type(input_tabs))
88
+ print(type(input_point_cloud_viewer))
89
  input_tabs.selected = 'pc_viewer'
90
  input_point_cloud_viewer.value = input_shape
91