Spaces:
Build error
Build error
updata
Browse files
app.py
CHANGED
@@ -4,10 +4,11 @@ from utils import load_images, predict
|
|
4 |
import matplotlib.pyplot as plt
|
5 |
import numpy as np
|
6 |
import gradio as gr
|
|
|
7 |
|
8 |
custom_objects = {'BilinearUpSampling2D': BilinearUpSampling2D, 'depth_loss_function': None}
|
9 |
print('Loading model...')
|
10 |
-
model =
|
11 |
print('Successfully loaded model...')
|
12 |
examples = ['examples/00015_colors.png', 'examples/00084_colors.png', 'examples/00033_colors.png']
|
13 |
|
|
|
4 |
import matplotlib.pyplot as plt
|
5 |
import numpy as np
|
6 |
import gradio as gr
|
7 |
+
from huggingface_hub import from_pretrained_keras
|
8 |
|
9 |
custom_objects = {'BilinearUpSampling2D': BilinearUpSampling2D, 'depth_loss_function': None}
|
10 |
print('Loading model...')
|
11 |
+
model = from_pretrained_keras("keras-io/monocular-depth-estimation", custom_objects=custom_objects, compile=False)
|
12 |
print('Successfully loaded model...')
|
13 |
examples = ['examples/00015_colors.png', 'examples/00084_colors.png', 'examples/00033_colors.png']
|
14 |
|