ahmedheakl commited on
Commit
008e3b5
·
verified ·
1 Parent(s): 20d1e0c

Update gradio_app.py

Browse files
Files changed (1) hide show
  1. gradio_app.py +3 -1
gradio_app.py CHANGED
@@ -60,8 +60,10 @@ def load_chat(
60
  history = history_to_messages(history)
61
  history = history[-TOP_N_HISTORY:]
62
  files = message.get('files', [])
 
 
63
  content = [
64
- {"type": "text", "text": message.get('text', 'Describe the photo in detail.')}
65
  ]
66
  if files:
67
  src_path = files[0]
 
60
  history = history_to_messages(history)
61
  history = history[-TOP_N_HISTORY:]
62
  files = message.get('files', [])
63
+ text = message.get('text', 'Describe the photo in detail.')
64
+ if text.strip() == "": text = 'Describe the photo in detail.'
65
  content = [
66
+ {"type": "text", "text": text}
67
  ]
68
  if files:
69
  src_path = files[0]