Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
"""
|
| 2 |
-
VISUAL CONVERSATIONAL INTELLIGENCE ENGINE
|
| 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[
|
| 259 |
"""
|
| 260 |
Convert internal (question, answer) tuples into
|
| 261 |
-
Gradio
|
|
|
|
| 262 |
"""
|
| 263 |
-
|
| 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(
|