ZennyKenny commited on
Commit
cf5586f
·
verified ·
1 Parent(s): 525ee37

reduce gpu request

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -3,7 +3,7 @@ import torch
3
  from transformers import pipeline
4
  import spaces # Ensure spaces library is imported if using GPU decorator
5
 
6
- @spaces.GPU(duration=60) # Decorator to allocate GPU for the app
7
  def main():
8
  # Force GPU if available, fallback to CPU
9
  device = 0 if torch.cuda.is_available() else -1
 
3
  from transformers import pipeline
4
  import spaces # Ensure spaces library is imported if using GPU decorator
5
 
6
+ @spaces.GPU(duration=3) # Decorator to allocate GPU for the app
7
  def main():
8
  # Force GPU if available, fallback to CPU
9
  device = 0 if torch.cuda.is_available() else -1