Spaces:
Runtime error
Runtime error
Commit ·
ba9ea60
1
Parent(s): 1313371
Fix gradio to earlier chackpoint
Browse files
stage-1-basic-chat/app.py
CHANGED
|
@@ -362,10 +362,14 @@ with gr.Blocks(theme=gr.themes.Soft(), css=custom_css, title="AstraMind Chat") a
|
|
| 362 |
|
| 363 |
# Center: Chat interface
|
| 364 |
with gr.Column(scale=3):
|
|
|
|
|
|
|
|
|
|
| 365 |
chatbot = gr.Chatbot(
|
| 366 |
height=600,
|
| 367 |
show_label=False,
|
| 368 |
type="messages", # OpenAI-compatible format
|
|
|
|
| 369 |
render_markdown=True
|
| 370 |
)
|
| 371 |
|
|
|
|
| 362 |
|
| 363 |
# Center: Chat interface
|
| 364 |
with gr.Column(scale=3):
|
| 365 |
+
# Get absolute path to bot avatar
|
| 366 |
+
avatar_path = Path(__file__).parent / "assets" / "bot-avatar.png"
|
| 367 |
+
|
| 368 |
chatbot = gr.Chatbot(
|
| 369 |
height=600,
|
| 370 |
show_label=False,
|
| 371 |
type="messages", # OpenAI-compatible format
|
| 372 |
+
avatar_images=(None, str(avatar_path) if avatar_path.exists() else None),
|
| 373 |
render_markdown=True
|
| 374 |
)
|
| 375 |
|
stage-1-basic-chat/requirements.txt
CHANGED
|
@@ -4,7 +4,7 @@ tiktoken
|
|
| 4 |
python-dotenv
|
| 5 |
|
| 6 |
# UI Framework
|
| 7 |
-
gradio==4.44.
|
| 8 |
huggingface_hub==0.23.5
|
| 9 |
|
| 10 |
# Export Utilities
|
|
|
|
| 4 |
python-dotenv
|
| 5 |
|
| 6 |
# UI Framework
|
| 7 |
+
gradio==4.44.1
|
| 8 |
huggingface_hub==0.23.5
|
| 9 |
|
| 10 |
# Export Utilities
|