vilarin commited on
Commit
332c0b2
1 Parent(s): 9986148

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -55,11 +55,11 @@ def stream_chat(message, history: list, temperature: float, max_new_tokens: int)
55
 
56
  if message["files"]:
57
  image = Image.open(message["files"][-1])
 
58
  else:
59
  if len(history) == 0:
60
  raise gr.Error("Please upload an image first.")
61
  image = None
62
- conversation.append({"role": "user", "content": f"<|image_1|>\n{message['text']}"})
63
  elif len(history):
64
  image = Image.open(history[0][0][0])
65
  for prompt, answer in history:
 
55
 
56
  if message["files"]:
57
  image = Image.open(message["files"][-1])
58
+ conversation.append({"role": "user", "content": f"<|image_1|>\n{message['text']}"})
59
  else:
60
  if len(history) == 0:
61
  raise gr.Error("Please upload an image first.")
62
  image = None
 
63
  elif len(history):
64
  image = Image.open(history[0][0][0])
65
  for prompt, answer in history: