ford442 commited on
Commit
48d1f86
·
verified ·
1 Parent(s): 8fb7e18

Update demos/musicgen_app.py

Browse files
Files changed (1) hide show
  1. demos/musicgen_app.py +2 -1
demos/musicgen_app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import argparse
2
  import logging
3
  import os
@@ -49,7 +50,7 @@ def make_waveform(*args, **kwargs): # Unchanged
49
  return out
50
 
51
  # --- Worker Process ---
52
-
53
  def model_worker(model_name: str, task_queue: mp.Queue, result_queue: mp.Queue):
54
  """
55
  Persistent worker process that loads the model and handles prediction tasks.
 
1
+ import spaces
2
  import argparse
3
  import logging
4
  import os
 
50
  return out
51
 
52
  # --- Worker Process ---
53
+ @spaces.GPU(required=True)
54
  def model_worker(model_name: str, task_queue: mp.Queue, result_queue: mp.Queue):
55
  """
56
  Persistent worker process that loads the model and handles prediction tasks.