paralym commited on
Commit
9f741eb
·
verified ·
1 Parent(s): 451d201

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -259,6 +259,9 @@ def add_message(history, message):
259
 
260
  @spaces.GPU
261
  def bot(history, temperature, top_p, max_output_tokens):
 
 
 
262
  print("### turn start history",history)
263
  print("### turn start conv",our_chatbot.conversation)
264
  text = history[-1][0]
 
259
 
260
  @spaces.GPU
261
  def bot(history, temperature, top_p, max_output_tokens):
262
+ if not history:
263
+ gr.Warning("Only one image can be uploaded in a conversation. Please reduce the number of images and start a new conversation.")
264
+ return history
265
  print("### turn start history",history)
266
  print("### turn start conv",our_chatbot.conversation)
267
  text = history[-1][0]