dragynir commited on
Commit
755f543
1 Parent(s): 85c3ab7

add gpu select

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -11,7 +11,8 @@ from src.pipeline import FashionPipeline, PipelineOutput
11
 
12
 
13
  config = PipelineConfig()
14
- fashion_pipeline = FashionPipeline(config, device=torch.device('cuda'))
 
15
 
16
 
17
  def process(
 
11
 
12
 
13
  config = PipelineConfig()
14
+ device = torch.device('cuda') if torch.cuda.is_available() else 'cpu'
15
+ fashion_pipeline = FashionPipeline(config, device=device)
16
 
17
 
18
  def process(