Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	
		artelabsuper
		
	commited on
		
		
					Commit 
							
							·
						
						a05fab5
	
1
								Parent(s):
							
							f5085fa
								
fix for timing reason
Browse files
    	
        app.py
    CHANGED
    
    | @@ -47,14 +47,14 @@ def predict(input_image): | |
| 47 | 
             
                data = np.frombuffer(fig.canvas.tostring_rgb(), dtype=np.uint8)
         | 
| 48 | 
             
                data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,))
         | 
| 49 |  | 
| 50 | 
            -
                return data | 
| 51 |  | 
| 52 | 
             
            iface = gr.Interface(
         | 
| 53 | 
             
                fn=predict, 
         | 
| 54 | 
             
                inputs=gr.Image(shape=(512,512)), 
         | 
| 55 | 
             
                outputs=[
         | 
| 56 | 
             
                    gr.Image(shape=(512,512)),
         | 
| 57 | 
            -
                    gr.outputs.Textbox(label='Raw output')
         | 
| 58 | 
             
                ],
         | 
| 59 | 
             
                examples=[
         | 
| 60 | 
             
                    ["demo_imgs/fake.jpg"] # use real image
         | 
|  | |
| 47 | 
             
                data = np.frombuffer(fig.canvas.tostring_rgb(), dtype=np.uint8)
         | 
| 48 | 
             
                data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,))
         | 
| 49 |  | 
| 50 | 
            +
                return data #, str(predicted_image.tolist())
         | 
| 51 |  | 
| 52 | 
             
            iface = gr.Interface(
         | 
| 53 | 
             
                fn=predict, 
         | 
| 54 | 
             
                inputs=gr.Image(shape=(512,512)), 
         | 
| 55 | 
             
                outputs=[
         | 
| 56 | 
             
                    gr.Image(shape=(512,512)),
         | 
| 57 | 
            +
                    # gr.outputs.Textbox(label='Raw output')
         | 
| 58 | 
             
                ],
         | 
| 59 | 
             
                examples=[
         | 
| 60 | 
             
                    ["demo_imgs/fake.jpg"] # use real image
         | 
