collinschreyer-dev commited on
Commit
731a3f9
·
1 Parent(s): 29555cd

Add @spaces.GPU decorator to enable GPU allocation on HF Spaces

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -15,6 +15,7 @@ from pathlib import Path
15
 
16
  import gradio as gr
17
  import geopandas as gpd
 
18
  import matplotlib
19
  import matplotlib.pyplot as plt
20
  import numpy as np
@@ -455,6 +456,7 @@ def _fmt_time(secs: float) -> str:
455
  PREVIEW_INTERVAL = 20 # update overlay every N tiles
456
 
457
 
 
458
  def run_pipeline(
459
  image_file,
460
  world_file,
 
15
 
16
  import gradio as gr
17
  import geopandas as gpd
18
+ import spaces
19
  import matplotlib
20
  import matplotlib.pyplot as plt
21
  import numpy as np
 
456
  PREVIEW_INTERVAL = 20 # update overlay every N tiles
457
 
458
 
459
+ @spaces.GPU(duration=3600) # request GPU for up to 60 minutes
460
  def run_pipeline(
461
  image_file,
462
  world_file,