ganeshkumar383 commited on
Commit
b583433
·
verified ·
1 Parent(s): 13de5fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -1,5 +1,5 @@
1
  """
2
- VISUAL CONVERSATIONAL INTELLIGENCE ENGINE app_advanced.py
3
  ==========================================
4
  A pluggable, image-grounded multi-turn conversational system.
5
 
@@ -255,16 +255,13 @@ def reset_conversation(
255
  # GRADIO UI INTERFACE
256
  # ============================================================================
257
 
258
- def format_history_for_chatbot(history: List[Tuple[str, str]]) -> List[dict]:
259
  """
260
  Convert internal (question, answer) tuples into
261
- Gradio v4 Chatbot message format.
 
262
  """
263
- messages = []
264
- for q, a in history:
265
- messages.append({"role": "user", "content": q})
266
- messages.append({"role": "assistant", "content": a})
267
- return messages
268
 
269
 
270
  def generate_visual_topic_suggestions(
 
1
  """
2
+ VISUAL CONVERSATIONAL INTELLIGENCE ENGINE
3
  ==========================================
4
  A pluggable, image-grounded multi-turn conversational system.
5
 
 
255
  # GRADIO UI INTERFACE
256
  # ============================================================================
257
 
258
+ def format_history_for_chatbot(history: List[Tuple[str, str]]) -> List[Tuple[str, str]]:
259
  """
260
  Convert internal (question, answer) tuples into
261
+ Gradio Chatbot display format.
262
+ Returns the history as-is since Gradio expects [(user_msg, bot_msg), ...]
263
  """
264
+ return history
 
 
 
 
265
 
266
 
267
  def generate_visual_topic_suggestions(