merve HF Staff commited on
Commit
3876bc6
·
verified ·
1 Parent(s): 6713fba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -118,7 +118,7 @@ def generate_caption_llava(image_path, caption_bool):
118
  else:
119
  text_prompt =f"[INST] <image>\nCaption this image briefly in objective manner. [/INST]"
120
 
121
- inputs = processor(prompt, Image.open(image_path), return_tensors="pt").to(device)
122
 
123
  output = model.generate(**inputs, max_new_tokens=100)
124
 
 
118
  else:
119
  text_prompt =f"[INST] <image>\nCaption this image briefly in objective manner. [/INST]"
120
 
121
+ inputs = processor(text_prompt, Image.open(image_path), return_tensors="pt").to(device)
122
 
123
  output = model.generate(**inputs, max_new_tokens=100)
124