Groundlight commited on
Commit
8efd006
·
1 Parent(s): e4f398a

requesting ZeroGPU gpus

Browse files
Files changed (2) hide show
  1. app.py +6 -1
  2. requirements.txt +2 -1
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import random
2
  from threading import Thread
3
 
@@ -331,5 +332,9 @@ with gr.Blocks() as demo:
331
  )
332
 
333
 
334
- if __name__ == "__main__":
 
335
  demo.launch()
 
 
 
 
1
+ import spaces
2
  import random
3
  from threading import Thread
4
 
 
332
  )
333
 
334
 
335
+ @spaces.GPU
336
+ def main():
337
  demo.launch()
338
+
339
+ if __name__ == "__main__":
340
+ main()
requirements.txt CHANGED
@@ -7,4 +7,5 @@ torchaudio==2.5.1
7
  torchvision==0.20.1
8
  tqdm==4.67.1
9
  transformers @ git+https://github.com/huggingface/transformers.git@1931a351408dbd1d0e2c4d6d7ee0eb5e8807d7bf
10
- trl @ git+https://github.com/sunildkumar/trl.git
 
 
7
  torchvision==0.20.1
8
  tqdm==4.67.1
9
  transformers @ git+https://github.com/huggingface/transformers.git@1931a351408dbd1d0e2c4d6d7ee0eb5e8807d7bf
10
+ trl @ git+https://github.com/sunildkumar/trl.git
11
+ spaces==0.32.0