ysharma HF Staff commited on
Commit
a7ed3e5
·
verified ·
1 Parent(s): 7145451

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -86,7 +86,8 @@ def bot_streaming(message, history):
86
  # Handle the case where 'image' is not defined at all
87
  gr.Error("You need to upload an image for LLaVA to work.")
88
 
89
- prompt = f"<|start_header_id|>user<|end_header_id|>\n\n<image>\n{message['text']}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"
 
90
  # print(f"prompt: {prompt}")
91
  image = Image.open(image)
92
  inputs = processor(prompt, image, return_tensors='pt').to(0, torch.float16)
 
86
  # Handle the case where 'image' is not defined at all
87
  gr.Error("You need to upload an image for LLaVA to work.")
88
 
89
+ #prompt = f"<|start_header_id|>user<|end_header_id|>\n\n<image>\n{message['text']}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"
90
+ prompt = f"""User:<image>\n{instruction} Falcon:"""
91
  # print(f"prompt: {prompt}")
92
  image = Image.open(image)
93
  inputs = processor(prompt, image, return_tensors='pt').to(0, torch.float16)