kingabzpro commited on
Commit
77bb1b9
1 Parent(s): 8d19b59

Update app/app_savta.py

Browse files
Files changed (1) hide show
  1. app/app_savta.py +5 -5
app/app_savta.py CHANGED
@@ -60,10 +60,15 @@ data = create_data(Path('src/data/processed'))
60
  learner = unet_learner(data,resnet34, metrics=rmse, wd=1e-2, n_out=3, loss_func=MSELossFlat(), path='src/')
61
  learner.load('model')
62
 
 
 
 
63
  ################### Gradio Web APP ################################
64
 
65
  title = "SavtaDepth WebApp"
 
66
  description = "Savta Depth is a collaborative Open Source Data Science project for monocular depth estimation - Turn 2d photos into 3d photos. To test the model and code please check out the link bellow."
 
67
  article = "<p style='text-align: center'><a href='https://dagshub.com/OperationSavta/SavtaDepth' target='_blank'>SavtaDepth Project from OperationSavta</a></p><p style='text-align: center'><a href='https://colab.research.google.com/drive/1XU4DgQ217_hUMU1dllppeQNw3pTRlHy1?usp=sharing' target='_blank'>Google Colab Demo</a></p></center></p>"
68
 
69
  examples = [
@@ -73,10 +78,6 @@ examples = [
73
  favicon = "examples/favicon.ico"
74
  thumbnail = "examples/SavtaDepth.png"
75
 
76
- def gen(input_img):
77
-
78
- return PILImageBW.create((learner.predict(input_img))[0]).convert('L')
79
-
80
 
81
  def main():
82
  iface = gr.Interface(
@@ -91,7 +92,6 @@ def main():
91
  article = article,
92
  examples = examples,
93
  theme ="peach",
94
- thumbnail=thumbnail,
95
  allow_screenshot=True
96
  )
97
 
 
60
  learner = unet_learner(data,resnet34, metrics=rmse, wd=1e-2, n_out=3, loss_func=MSELossFlat(), path='src/')
61
  learner.load('model')
62
 
63
+ def gen(input_img):
64
+ return PILImageBW.create((learner.predict(input_img))[0]).convert('L')
65
+
66
  ################### Gradio Web APP ################################
67
 
68
  title = "SavtaDepth WebApp"
69
+
70
  description = "Savta Depth is a collaborative Open Source Data Science project for monocular depth estimation - Turn 2d photos into 3d photos. To test the model and code please check out the link bellow."
71
+
72
  article = "<p style='text-align: center'><a href='https://dagshub.com/OperationSavta/SavtaDepth' target='_blank'>SavtaDepth Project from OperationSavta</a></p><p style='text-align: center'><a href='https://colab.research.google.com/drive/1XU4DgQ217_hUMU1dllppeQNw3pTRlHy1?usp=sharing' target='_blank'>Google Colab Demo</a></p></center></p>"
73
 
74
  examples = [
 
78
  favicon = "examples/favicon.ico"
79
  thumbnail = "examples/SavtaDepth.png"
80
 
 
 
 
 
81
 
82
  def main():
83
  iface = gr.Interface(
 
92
  article = article,
93
  examples = examples,
94
  theme ="peach",
 
95
  allow_screenshot=True
96
  )
97