Spaces:
Sleeping
Sleeping
김무영
Claude
commited on
Commit
·
53c5039
1
Parent(s):
cd29095
Fix Gradio compatibility issues and add accelerate library
Browse files🐛 Bug Fixes:
- Remove deprecated 'height' parameter from gr.DataFrame
- Add 'type="messages"' to gr.Chatbot to resolve deprecation warning
- Use 'max_rows=10' and 'wrap=True' for DataFrame instead of height
📦 Dependencies:
- Add accelerate>=0.21.0 for LLM model loading support
- Fixes 'requires accelerate' error when loading Llama-3 model
🔧 Technical Details:
- Gradio DataFrame height parameter deprecated in newer versions
- Chatbot type parameter now required for future compatibility
- Accelerate library needed for device_map functionality
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- app.py +4 -2
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -471,7 +471,8 @@ class HuggingFaceApp:
|
|
| 471 |
chatbot = gr.Chatbot(
|
| 472 |
height=500,
|
| 473 |
placeholder="안녕하세요! 소방 복무관리에 대해 무엇이 궁금하신가요?",
|
| 474 |
-
avatar_images=["👤", "🤖"]
|
|
|
|
| 475 |
)
|
| 476 |
|
| 477 |
# 입력 영역
|
|
@@ -572,7 +573,8 @@ class HuggingFaceApp:
|
|
| 572 |
document_list = gr.DataFrame(
|
| 573 |
headers=["파일명", "크기", "수정일", "타입"],
|
| 574 |
datatype=["str", "str", "str", "str"],
|
| 575 |
-
|
|
|
|
| 576 |
)
|
| 577 |
|
| 578 |
with gr.Row():
|
|
|
|
| 471 |
chatbot = gr.Chatbot(
|
| 472 |
height=500,
|
| 473 |
placeholder="안녕하세요! 소방 복무관리에 대해 무엇이 궁금하신가요?",
|
| 474 |
+
avatar_images=["👤", "🤖"],
|
| 475 |
+
type="messages"
|
| 476 |
)
|
| 477 |
|
| 478 |
# 입력 영역
|
|
|
|
| 573 |
document_list = gr.DataFrame(
|
| 574 |
headers=["파일명", "크기", "수정일", "타입"],
|
| 575 |
datatype=["str", "str", "str", "str"],
|
| 576 |
+
max_rows=10,
|
| 577 |
+
wrap=True
|
| 578 |
)
|
| 579 |
|
| 580 |
with gr.Row():
|
requirements.txt
CHANGED
|
@@ -32,4 +32,5 @@ openai>=1.0.0
|
|
| 32 |
# 유틸리티
|
| 33 |
python-dotenv>=1.0.0
|
| 34 |
tqdm>=4.66.0
|
| 35 |
-
pandas>=2.1.0
|
|
|
|
|
|
| 32 |
# 유틸리티
|
| 33 |
python-dotenv>=1.0.0
|
| 34 |
tqdm>=4.66.0
|
| 35 |
+
pandas>=2.1.0
|
| 36 |
+
accelerate>=0.21.0
|