NikhilJoson commited on
Commit
cd7a35d
·
verified ·
1 Parent(s): 6c390aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -82,7 +82,9 @@ def unified_chat(image, message, chat_history, seed, top_p, temperature, cfg_wei
82
  if chat_history and len(chat_history) > 0:
83
  # Get the last few turns of conversation for context (limit to last 3 turns)
84
  recent_context = chat_history[-3:] if len(chat_history) > 3 else chat_history
85
- context_text = " ".join([f"{user}: {user_msg}" for user_msg, _ in recent_context])
 
 
86
 
87
  # Only use context if it's not too long
88
  if len(context_text) < 200: # Arbitrary length limit
 
82
  if chat_history and len(chat_history) > 0:
83
  # Get the last few turns of conversation for context (limit to last 3 turns)
84
  recent_context = chat_history[-3:] if len(chat_history) > 3 else chat_history
85
+ # context_text = " ".join([f"{user}: {user_msg}" for user_msg, _ in recent_context])
86
+ context_text = " ".join([f"{user_msg}" for user_msg, _ in recent_context])
87
+
88
 
89
  # Only use context if it's not too long
90
  if len(context_text) < 200: # Arbitrary length limit