merve HF staff commited on
Commit
9296cf2
1 Parent(s): 5e58d7c
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -16,7 +16,6 @@ model = ChameleonForConditionalGeneration.from_pretrained("facebook/chameleon-7b
16
  def bot_streaming(message, history):
17
 
18
  txt = message.text
19
- ext_buffer = f"{txt}"
20
 
21
  if message.files:
22
  if len(message.files) == 1:
@@ -47,11 +46,11 @@ def bot_streaming(message, history):
47
  image_extensions = tuple([ex for ex, f in image_extensions.items()])
48
  if len(img) == 1:
49
  image = Image.open(img[0]).convert("RGB")
50
- prompt = f"{message.text}<image>"
51
 
52
  elif len(img) > 1:
53
  image_list = []
54
- user_prompt = message.text
55
 
56
  for im in img:
57
  image_list.append(Image.open(im).convert("RGB"))
 
16
  def bot_streaming(message, history):
17
 
18
  txt = message.text
 
19
 
20
  if message.files:
21
  if len(message.files) == 1:
 
46
  image_extensions = tuple([ex for ex, f in image_extensions.items()])
47
  if len(img) == 1:
48
  image = Image.open(img[0]).convert("RGB")
49
+ prompt = f"{txt}<image>"
50
 
51
  elif len(img) > 1:
52
  image_list = []
53
+ user_prompt = txt
54
 
55
  for im in img:
56
  image_list.append(Image.open(im).convert("RGB"))