A19grey commited on
Commit
b0d730c
·
1 Parent(s): 182cf21

fix title, new colormap, clearer fork history

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -68,9 +68,9 @@ def predict_depth(input_image):
68
 
69
  # Create a color map
70
  plt.figure(figsize=(10, 10))
71
- plt.imshow(depth_normalized, cmap='viridis')
72
  plt.colorbar(label='Depth [m]')
73
- plt.title('Predicted Depth Map - Min: {depth_min:.1f}m, Max: {depth_max:.1f}m')
74
  plt.axis('off')
75
 
76
  # Save the plot to a file
@@ -99,9 +99,9 @@ iface = gr.Interface(
99
  gr.Textbox(label="Focal Length or Error Message"),
100
  gr.File(label="Download Raw Depth Map (CSV)")
101
  ],
102
- title="DepthPro Demo in Meters",
103
- description="[DepthPro](https://huggingface.co/apple/DepthPro) is a fast metric depth prediction model. Simply upload an image to predict its depth map and focal length. Large images will be automatically resized. You can also download the raw depth map data as a CSV file."
104
  )
105
 
106
  # Launch the interface
107
- iface.launch()
 
68
 
69
  # Create a color map
70
  plt.figure(figsize=(10, 10))
71
+ plt.imshow(depth_normalized, cmap='gist_rainbow')
72
  plt.colorbar(label='Depth [m]')
73
+ plt.title(f'Predicted Depth Map - Min: {depth_min:.1f}m, Max: {depth_max:.1f}m')
74
  plt.axis('off')
75
 
76
  # Save the plot to a file
 
99
  gr.Textbox(label="Focal Length or Error Message"),
100
  gr.File(label="Download Raw Depth Map (CSV)")
101
  ],
102
+ title="DepthPro Demo in Meters fork from akhaliq",
103
+ description="forked from https://huggingface.co/spaces/akhaliq/depth-pro to add raw meters output. Original Descr: [DepthPro](https://huggingface.co/apple/DepthPro) is a fast metric depth prediction model. Simply upload an image to predict its depth map and focal length. Large images will be automatically resized. You can also download the raw depth map data as a CSV file."
104
  )
105
 
106
  # Launch the interface
107
+ iface.launch(share=True) #share=True allows you to share the interface with others.