Ankur Mahanta commited on
Commit ·
82edbbb
1
Parent(s): bfc3b02
Fix chat export formatting and f-string syntax
Browse files
app.py
CHANGED
|
@@ -503,8 +503,13 @@ async def serve(q: Q):
|
|
| 503 |
prefix = "User: " if msg[1] else "Response: "
|
| 504 |
chat_history.append(f'{prefix}{msg[0]}')
|
| 505 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 506 |
export_content = f'''YouTube Video Transcript Chatbot
|
| 507 |
-
|
|
|
|
| 508 |
{q.client.transcript}
|
| 509 |
|
| 510 |
Chat History:
|
|
|
|
| 503 |
prefix = "User: " if msg[1] else "Response: "
|
| 504 |
chat_history.append(f'{prefix}{msg[0]}')
|
| 505 |
|
| 506 |
+
# Create formatted chat history text
|
| 507 |
+
chat_history_text = '\n'.join(chat_history)
|
| 508 |
+
|
| 509 |
+
# Create full export content
|
| 510 |
export_content = f'''YouTube Video Transcript Chatbot
|
| 511 |
+
|
| 512 |
+
Transcript:
|
| 513 |
{q.client.transcript}
|
| 514 |
|
| 515 |
Chat History:
|