Ahsen Khaliq commited on
Commit
a4e1286
1 Parent(s): 4444ae6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -223,14 +223,12 @@ def generate2(
223
 
224
  return generated_list[0]
225
 
226
-
227
  device = CUDA(0) if is_gpu else "cpu"
228
  clip_model, preprocess = clip.load("ViT-B/32", device=device, jit=False)
229
  tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
230
 
231
- def inference(img,model_name):
232
- is_gpu = False
233
-
234
  prefix_length = 10
235
 
236
  model = ClipCaptionModel(prefix_length)
 
223
 
224
  return generated_list[0]
225
 
226
+ is_gpu = False
227
  device = CUDA(0) if is_gpu else "cpu"
228
  clip_model, preprocess = clip.load("ViT-B/32", device=device, jit=False)
229
  tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
230
 
231
+ def inference(img,model_name):
 
 
232
  prefix_length = 10
233
 
234
  model = ClipCaptionModel(prefix_length)