khang119966 commited on
Commit
3fc169c
1 Parent(s): 3f4d030

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -113,10 +113,10 @@ def chat(message, history):
113
  print("history",history)
114
  print("message",message)
115
 
116
- if len(history) == 0 or len(message["files"]) != 0:
117
  test_image = message["files"][0]["path"]
118
  pixel_values = load_image(test_image, max_num=6).to(torch.bfloat16).cuda()
119
- elif len(history) == 0 or len(message["files"]) == 0:
120
  pixel_values = None
121
  elif history[0][0][0] is not None and os.path.isfile(history[0][0][0]):
122
  test_image = history[0][0][0]
 
113
  print("history",history)
114
  print("message",message)
115
 
116
+ if len(history) == 0 and len(message["files"]) != 0:
117
  test_image = message["files"][0]["path"]
118
  pixel_values = load_image(test_image, max_num=6).to(torch.bfloat16).cuda()
119
+ elif len(history) == 0 and len(message["files"]) == 0:
120
  pixel_values = None
121
  elif history[0][0][0] is not None and os.path.isfile(history[0][0][0]):
122
  test_image = history[0][0][0]