This commit is contained in:
parent
0333b8af9c
commit
b42b5f090b
|
|
@ -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/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/sgl_kernel-*.whl && \
|
||||||
python3 -m pip install --no-cache-dir --no-deps /tmp/wheels/* && \
|
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)" && \
|
python3 -c "from torch.distributed import Backend; print('✅ Runtime torch distributed OK, GLOO =', Backend.GLOO)" && \
|
||||||
rm -rf /tmp/wheels
|
rm -rf /tmp/wheels
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,9 +94,13 @@ with gr.Blocks(title="Base 模型测试 UI") as demo:
|
||||||
test_btn = gr.Button("🔁 测试 API 可用性")
|
test_btn = gr.Button("🔁 测试 API 可用性")
|
||||||
test_output = gr.Textbox(label="API 测试结果", interactive=False)
|
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(
|
chatbot = gr.ChatInterface(
|
||||||
fn=lambda m, h: chat(m, h, max_tokens.value, temperature.value),
|
fn=chat_with_config,
|
||||||
additional_inputs=[max_tokens, temperature], # ✅ 添加这一行
|
additional_inputs=[max_tokens, temperature],
|
||||||
|
type="messages",
|
||||||
title=None
|
title=None
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue