DoctorSlimm commited on
Commit
442299b
·
verified ·
1 Parent(s): 5ff3449

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -31,9 +31,7 @@ model = AutoModelForCausalLM.from_pretrained(
31
 
32
 
33
 
34
- text_only_template = """A chat between a curious user and an artificial intelligence assistant. \
35
- The assistant gives helpful, detailed, and polite answers to the user's questions. \
36
- USER: {} ASSISTANT:"""
37
 
38
 
39
  @spaces.GPU
@@ -44,7 +42,7 @@ def generate_caption(image, prompt):
44
 
45
  # image = Image.open(image_path).convert('RGB')
46
  image = image.convert('RGB')
47
- query = text_only_template.format(query)
48
  input_by_model = model.build_conversation_input_ids(
49
  tokenizer,
50
  query=query,
 
31
 
32
 
33
 
34
+ text_only_template = """USER: {} ASSISTANT:"""
 
 
35
 
36
 
37
  @spaces.GPU
 
42
 
43
  # image = Image.open(image_path).convert('RGB')
44
  image = image.convert('RGB')
45
+ query = "USER: %s ASSISTANT:" % prompt
46
  input_by_model = model.build_conversation_input_ids(
47
  tokenizer,
48
  query=query,