Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	
		jens
		
	commited on
		
		
					Commit 
							
							·
						
						76253eb
	
1
								Parent(s):
							
							3300941
								
fix
Browse files
    	
        app.py
    CHANGED
    
    | @@ -32,7 +32,7 @@ with block: | |
| 32 | 
             
                # UI
         | 
| 33 | 
             
                with gr.Column():
         | 
| 34 | 
             
                    with gr.Row():
         | 
| 35 | 
            -
                        input_image = gr.Image(label='Input', type='pil', source='webcam')
         | 
| 36 | 
             
                        masks_annotated_image = gr.AnnotatedImage(label='Segments', height=512)
         | 
| 37 | 
             
                        pcl_figure = gr.Model3D(label="3-D Reconstruction", clear_color=[1.0, 1.0, 1.0, 1.0])
         | 
| 38 | 
             
                        n_samples = gr.Slider(minimum=1e3, maximum=1e6, step=1e3, default=1e3, label='Number of Samples')
         | 
| @@ -61,7 +61,7 @@ with block: | |
| 61 | 
             
                    sam.encode(input_image)
         | 
| 62 | 
             
                    print("encoding done")
         | 
| 63 | 
             
                    return input_image, point_coords_empty(), point_labels_empty(), None
         | 
| 64 | 
            -
                input_image. | 
| 65 |  | 
| 66 | 
             
                # event - set coords
         | 
| 67 | 
             
                def on_input_image_select(input_image, point_coords, point_labels, point_label_radio, evt: gr.SelectData):
         | 
|  | |
| 32 | 
             
                # UI
         | 
| 33 | 
             
                with gr.Column():
         | 
| 34 | 
             
                    with gr.Row():
         | 
| 35 | 
            +
                        input_image = gr.Image(label='Input', type='pil', source='webcam', tool=None)
         | 
| 36 | 
             
                        masks_annotated_image = gr.AnnotatedImage(label='Segments', height=512)
         | 
| 37 | 
             
                        pcl_figure = gr.Model3D(label="3-D Reconstruction", clear_color=[1.0, 1.0, 1.0, 1.0])
         | 
| 38 | 
             
                        n_samples = gr.Slider(minimum=1e3, maximum=1e6, step=1e3, default=1e3, label='Number of Samples')
         | 
|  | |
| 61 | 
             
                    sam.encode(input_image)
         | 
| 62 | 
             
                    print("encoding done")
         | 
| 63 | 
             
                    return input_image, point_coords_empty(), point_labels_empty(), None
         | 
| 64 | 
            +
                input_image.upload(on_input_image_upload, [input_image], [raw_image, point_coords, point_labels], queue=False)
         | 
| 65 |  | 
| 66 | 
             
                # event - set coords
         | 
| 67 | 
             
                def on_input_image_select(input_image, point_coords, point_labels, point_label_radio, evt: gr.SelectData):
         |