diff --git a/Dockerfile b/Dockerfile index 9ffb35f..60d041a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -149,6 +149,7 @@ RUN ls -lh /tmp/wheels && \ python3 -m pip install --no-cache-dir --no-deps /tmp/wheels/vllm-*.whl && \ python3 -m pip install --no-cache-dir --no-deps /tmp/wheels/sgl_kernel-*.whl && \ python3 -m pip install --no-cache-dir --no-deps /tmp/wheels/* && \ + python3 -m pip install --no-cache-dir --upgrade "gradio>=4.44" && \ python3 -c "from torch.distributed import Backend; print('✅ Runtime torch distributed OK, GLOO =', Backend.GLOO)" && \ rm -rf /tmp/wheels diff --git a/meta_ui.py b/meta_ui.py index 583b53e..7560d82 100644 --- a/meta_ui.py +++ b/meta_ui.py @@ -94,9 +94,13 @@ with gr.Blocks(title="Base 模型测试 UI") as demo: test_btn = gr.Button("🔁 测试 API 可用性") test_output = gr.Textbox(label="API 测试结果", interactive=False) + def chat_with_config(message, history, max_tokens, temperature): + return chat(message, history, max_tokens, temperature) + chatbot = gr.ChatInterface( - fn=lambda m, h: chat(m, h, max_tokens.value, temperature.value), - additional_inputs=[max_tokens, temperature], # ✅ 添加这一行 + fn=chat_with_config, + additional_inputs=[max_tokens, temperature], + type="messages", title=None )