noamrot commited on
Commit
d095afa
·
verified ·
1 Parent(s): 40e14d7

cancelled spaces

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import gradio as gr
2
  from PIL import Image
3
- import spaces
4
  import torch
5
  from transformers import BlipProcessor, BlipForConditionalGeneration
6
 
@@ -8,7 +8,7 @@ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
8
  processor = BlipProcessor.from_pretrained("noamrot/FuseCap_Image_Captioning")
9
  model = BlipForConditionalGeneration.from_pretrained("noamrot/FuseCap_Image_Captioning").to(device)
10
 
11
- @spaces.GPU(duration=15)
12
  def inference(raw_image):
13
  text = "a picture of "
14
  inputs = processor(raw_image, text, return_tensors="pt").to(device)
 
1
  import gradio as gr
2
  from PIL import Image
3
+ # import spaces
4
  import torch
5
  from transformers import BlipProcessor, BlipForConditionalGeneration
6
 
 
8
  processor = BlipProcessor.from_pretrained("noamrot/FuseCap_Image_Captioning")
9
  model = BlipForConditionalGeneration.from_pretrained("noamrot/FuseCap_Image_Captioning").to(device)
10
 
11
+ # @spaces.GPU(duration=15)
12
  def inference(raw_image):
13
  text = "a picture of "
14
  inputs = processor(raw_image, text, return_tensors="pt").to(device)