youl commited on
Commit
7f7d638
·
1 Parent(s): e6c27ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -13,6 +13,7 @@ from shapely.geometry.polygon import Polygon
13
  from glob import glob
14
  import wget
15
 
 
16
  def timer(start_time=None):
17
  if not start_time:
18
  start_time = datetime.now()
@@ -22,6 +23,7 @@ def timer(start_time=None):
22
  tmin, tsec = divmod(temp_sec, 60)
23
  print('\n Time taken: %i hours %i minutes and %s seconds.' % (thour, tmin, round(tsec, 2)))
24
 
 
25
  def predict(lat, lon):
26
  cord = [lon,lat]
27
  lon = round(lon,4)
@@ -56,7 +58,11 @@ def predict(lat, lon):
56
  url = path+name
57
  wget.download(url)
58
  timer(start_time)
 
 
59
  unzip()
 
 
60
  name,cld_prob,days_ago = select_best_cloud_coverage_tile()
61
  bandes_path_10,bandes_path_20,bandes_path_60,tile_path,path_cld_20,path_cld_60 =paths(name)
62
  # create image dataset
 
13
  from glob import glob
14
  import wget
15
 
16
+ ##
17
  def timer(start_time=None):
18
  if not start_time:
19
  start_time = datetime.now()
 
23
  tmin, tsec = divmod(temp_sec, 60)
24
  print('\n Time taken: %i hours %i minutes and %s seconds.' % (thour, tmin, round(tsec, 2)))
25
 
26
+ ##
27
  def predict(lat, lon):
28
  cord = [lon,lat]
29
  lon = round(lon,4)
 
58
  url = path+name
59
  wget.download(url)
60
  timer(start_time)
61
+
62
+ start_time = timer(None)
63
  unzip()
64
+ timer(start_time)
65
+
66
  name,cld_prob,days_ago = select_best_cloud_coverage_tile()
67
  bandes_path_10,bandes_path_20,bandes_path_60,tile_path,path_cld_20,path_cld_60 =paths(name)
68
  # create image dataset