Add @spaces.GPU decorations
Browse files85 unmodified lines8687888990919 unmodified lines101102103104105106184 unmodified lines29129229329485 unmodified linesdescription = """Looking Glass demo for **Depth Anything V2**.Please refer to our [paper](https://arxiv.org/abs/2406.09414), [project page](https://depth-anything-v2.github.io), or [github](https://github.com/DepthAnything/Depth-Anything-V2) for more details."""def predict_depth(image, model):w, h = image.size9 unmodified linesrgbd.paste(gray_depth, (w, 0))return rgbddef upscale_image(image, model, background, discard_alpha):if image.mode == "RGBA":if discard_alpha:184 unmodified linesif __name__ == '__main__':demo.queue().launch(share=True)85 unmodified lines868788899091929 unmodified lines102103104105106107108184 unmodified lines29329429529685 unmodified linesdescription = """Looking Glass demo for **Depth Anything V2**.Please refer to our [paper](https://arxiv.org/abs/2406.09414), [project page](https://depth-anything-v2.github.io), or [github](https://github.com/DepthAnything/Depth-Anything-V2) for more details."""@spaces.GPUdef predict_depth(image, model):w, h = image.size9 unmodified linesrgbd.paste(gray_depth, (w, 0))return rgbd@spaces.GPUdef upscale_image(image, model, background, discard_alpha):if image.mode == "RGBA":if discard_alpha:184 unmodified linesif __name__ == '__main__':demo.queue().launch()
app.py+3-1