Ashish Soni commited on
Commit
93aaf1f
·
verified ·
1 Parent(s): 359bc68

Update app.py

Browse files

add GPU to the pipeline object

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  import spaces
3
  from transformers import pipeline
4
 
5
- get_completion = pipeline("summarization", model="sshleifer/distilbart-cnn-12-6")
6
 
7
  @spaces.GPU(duration=120)
8
  def summarize(input):
 
2
  import spaces
3
  from transformers import pipeline
4
 
5
+ get_completion = pipeline("summarization", model="sshleifer/distilbart-cnn-12-6", device=0)
6
 
7
  @spaces.GPU(duration=120)
8
  def summarize(input):