mattpowell commited on
Commit
d74b6bd
·
1 Parent(s): 9f44e68

Add Zero GPU annotation

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import gradio as gr
2
  from wtpsplit import SaT, WtP
3
 
@@ -23,6 +24,7 @@ SAT_MODELS = [
23
 
24
  MODELS = SAT_MODELS + WTP_MODELS
25
 
 
26
  def split(text, model, threshold, lang_code='en', do_paragraph_segmentation=False, paragraph_threshold = 0.5, use_onnx = False, strip_whitespace = False, remove_whitespace_before_inference = False):
27
 
28
  # TODO: not currently used
 
1
+ import spaces
2
  import gradio as gr
3
  from wtpsplit import SaT, WtP
4
 
 
24
 
25
  MODELS = SAT_MODELS + WTP_MODELS
26
 
27
+ @spaces.GPU(duration=60)
28
  def split(text, model, threshold, lang_code='en', do_paragraph_segmentation=False, paragraph_threshold = 0.5, use_onnx = False, strip_whitespace = False, remove_whitespace_before_inference = False):
29
 
30
  # TODO: not currently used