Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -88,7 +88,7 @@ class ConversationHistoryComponent(gr.Component):
|
|
88 |
def build(self):
|
89 |
return gr.HTML(value="<div id='conversation-history'></div>")
|
90 |
|
91 |
-
def update(self, history: List[Tuple[str, str]]):
|
92 |
history_html = "<ul>"
|
93 |
for user_message, assistant_message in history:
|
94 |
history_html += f"<li><strong>User:</strong> {user_message}</li>"
|
@@ -96,7 +96,7 @@ class ConversationHistoryComponent(gr.Component):
|
|
96 |
history_html += f"<li><strong>Assistant:</strong> {assistant_message}</li>"
|
97 |
history_html += "</ul>"
|
98 |
self.history = history
|
99 |
-
return
|
100 |
|
101 |
chatbot = gr.Chatbot(label="Chat")
|
102 |
conversation_history = ConversationHistory() # Initialize conversation history
|
|
|
88 |
def build(self):
|
89 |
return gr.HTML(value="<div id='conversation-history'></div>")
|
90 |
|
91 |
+
def update(self, history: List[Tuple[str, str]]) -> str:
|
92 |
history_html = "<ul>"
|
93 |
for user_message, assistant_message in history:
|
94 |
history_html += f"<li><strong>User:</strong> {user_message}</li>"
|
|
|
96 |
history_html += f"<li><strong>Assistant:</strong> {assistant_message}</li>"
|
97 |
history_html += "</ul>"
|
98 |
self.history = history
|
99 |
+
return history_html
|
100 |
|
101 |
chatbot = gr.Chatbot(label="Chat")
|
102 |
conversation_history = ConversationHistory() # Initialize conversation history
|