Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	
		Chao Xu
		
	commited on
		
		
					Commit 
							
							Β·
						
						3d7a60f
	
1
								Parent(s):
							
							cf4af5e
								
reset password
Browse files
    	
        app.py
    CHANGED
    
    | 
         @@ -509,10 +509,9 @@ def run_demo( 
     | 
|
| 509 | 
         
             
                                label='Examples (click one of the images below to start)',
         
     | 
| 510 | 
         
             
                                examples_per_page=40
         
     | 
| 511 | 
         
             
                            )
         
     | 
| 512 | 
         
            -
                            
         
     | 
| 513 | 
         
            -
                            with gr.Accordion('Advanced options', open=False):
         
     | 
| 514 | 
         
            -
                                preprocess_chk = gr.Checkbox(
         
     | 
| 515 | 
         
             
                                    False, label='Reduce image contrast (mitigate shadows on the backside)')
         
     | 
| 
         | 
|
| 516 | 
         
             
                                scale_slider = gr.Slider(0, 30, value=3, step=1,
         
     | 
| 517 | 
         
             
                                                         label='Diffusion guidance scale')
         
     | 
| 518 | 
         
             
                                steps_slider = gr.Slider(5, 200, value=75, step=5,
         
     | 
| 
         @@ -587,10 +586,11 @@ def run_demo( 
     | 
|
| 587 | 
         
             
                    tmp_func = lambda x: False if not x else gr.update(visible=False)
         
     | 
| 588 | 
         
             
                    disable_func = lambda x: gr.update(interactive=False)
         
     | 
| 589 | 
         
             
                    enable_func = lambda x: gr.update(interactive=True)
         
     | 
| 590 | 
         
            -
                    image_block.change( 
     | 
| 
         | 
|
| 591 | 
         
             
                                       inputs=[tmp_dir],
         
     | 
| 592 | 
         
             
                                       outputs=[tmp_dir, rerun_idx, bbox_block, sam_block, elev_output, vis_output, mesh_output, regen_view_btn, regen_mesh_btn, *views, *btn_retrys]
         
     | 
| 593 | 
         
            -
             
     | 
| 594 | 
         
             
                                       ).success(fn=tmp_func, inputs=[image_block], outputs=[placeholder]
         
     | 
| 595 | 
         
             
                                       ).success(fn=partial(update_guide, _BBOX_1), outputs=[guide_text]
         
     | 
| 596 | 
         
             
                                       ).success(fn=init_bbox,
         
     | 
| 
         @@ -649,7 +649,7 @@ def run_demo( 
     | 
|
| 649 | 
         
             
                                        ).success(fn=partial(update_guide, _REGEN_2), outputs=[guide_text])
         
     | 
| 650 | 
         | 
| 651 | 
         | 
| 652 | 
         
            -
                demo.launch(enable_queue=True, share=False, max_threads=80, auth=("admin",  
     | 
| 653 | 
         | 
| 654 | 
         | 
| 655 | 
         
             
            if __name__ == '__main__':
         
     | 
| 
         | 
|
| 509 | 
         
             
                                label='Examples (click one of the images below to start)',
         
     | 
| 510 | 
         
             
                                examples_per_page=40
         
     | 
| 511 | 
         
             
                            )
         
     | 
| 512 | 
         
            +
                            preprocess_chk = gr.Checkbox(
         
     | 
| 
         | 
|
| 
         | 
|
| 513 | 
         
             
                                    False, label='Reduce image contrast (mitigate shadows on the backside)')
         
     | 
| 514 | 
         
            +
                            with gr.Accordion('Advanced options', open=False):
         
     | 
| 515 | 
         
             
                                scale_slider = gr.Slider(0, 30, value=3, step=1,
         
     | 
| 516 | 
         
             
                                                         label='Diffusion guidance scale')
         
     | 
| 517 | 
         
             
                                steps_slider = gr.Slider(5, 200, value=75, step=5,
         
     | 
| 
         | 
|
| 586 | 
         
             
                    tmp_func = lambda x: False if not x else gr.update(visible=False)
         
     | 
| 587 | 
         
             
                    disable_func = lambda x: gr.update(interactive=False)
         
     | 
| 588 | 
         
             
                    enable_func = lambda x: gr.update(interactive=True)
         
     | 
| 589 | 
         
            +
                    image_block.change(disable_func, inputs=run_btn, outputs=run_btn
         
     | 
| 590 | 
         
            +
                                       ).success(fn=refresh,
         
     | 
| 591 | 
         
             
                                       inputs=[tmp_dir],
         
     | 
| 592 | 
         
             
                                       outputs=[tmp_dir, rerun_idx, bbox_block, sam_block, elev_output, vis_output, mesh_output, regen_view_btn, regen_mesh_btn, *views, *btn_retrys]
         
     | 
| 593 | 
         
            +
                                    #    ).success(disable_func, inputs=run_btn, outputs=run_btn
         
     | 
| 594 | 
         
             
                                       ).success(fn=tmp_func, inputs=[image_block], outputs=[placeholder]
         
     | 
| 595 | 
         
             
                                       ).success(fn=partial(update_guide, _BBOX_1), outputs=[guide_text]
         
     | 
| 596 | 
         
             
                                       ).success(fn=init_bbox,
         
     | 
| 
         | 
|
| 649 | 
         
             
                                        ).success(fn=partial(update_guide, _REGEN_2), outputs=[guide_text])
         
     | 
| 650 | 
         | 
| 651 | 
         | 
| 652 | 
         
            +
                demo.launch(enable_queue=True, share=False, max_threads=80, auth=("admin", os.environ['PASSWD']))
         
     | 
| 653 | 
         | 
| 654 | 
         | 
| 655 | 
         
             
            if __name__ == '__main__':
         
     | 
    	
        demo_examples/{21_unsplash_bigmac.png β 09_unsplash_bigmac.png}
    RENAMED
    
    | 
										 
											File without changes
										 
									 | 
								
    	
        demo_examples/{09_objaverse_barrel.png β 21_objaverse_barrel.png}
    RENAMED
    
    | 
										 
											File without changes
										 
									 |