florentgbelidji HF staff commited on
Commit
009cf52
1 Parent(s): 1d4aaa3

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +0 -6
handler.py CHANGED
@@ -1,16 +1,10 @@
1
  # +
2
  from typing import Dict, List, Any
3
  from PIL import Image
4
- import requests
5
  import torch
6
- import base64
7
  import os
8
  from io import BytesIO
9
-
10
  from transformers import BlipForConditionalGeneration, BlipProcessor
11
- from models.blip_decoder import blip_decoder
12
- from torchvision import transforms
13
- from torchvision.transforms.functional import InterpolationMode
14
  # -
15
 
16
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
 
1
  # +
2
  from typing import Dict, List, Any
3
  from PIL import Image
 
4
  import torch
 
5
  import os
6
  from io import BytesIO
 
7
  from transformers import BlipForConditionalGeneration, BlipProcessor
 
 
 
8
  # -
9
 
10
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')