merve HF staff commited on
Commit
b809dba
1 Parent(s): 9bc4911

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -121,7 +121,7 @@ def generate_caption_llava(image_path, caption_bool):
121
  inputs = processor(text_prompt, Image.open(image_path), return_tensors="pt").to(device)
122
  output = model.generate(**inputs, max_new_tokens=100)
123
 
124
- return processor.decode(output[0], skip_special_tokens=True)).split("[/INST]")[1]
125
 
126
  @spaces.GPU
127
  def generate_answer_llava(image_path, question):
 
121
  inputs = processor(text_prompt, Image.open(image_path), return_tensors="pt").to(device)
122
  output = model.generate(**inputs, max_new_tokens=100)
123
 
124
+ return processor.decode(output[0], skip_special_tokens=True).split("[/INST]")[1]
125
 
126
  @spaces.GPU
127
  def generate_answer_llava(image_path, question):