Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,6 +17,8 @@ def run_command(command, cwd=None):
|
|
| 17 |
print(f"Command succeeded: {command}")
|
| 18 |
print(result.stdout)
|
| 19 |
|
|
|
|
|
|
|
| 20 |
# Model configuration
|
| 21 |
MODEL_ID = "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"
|
| 22 |
QUANT = "Q5_K_M"
|
|
@@ -193,7 +195,8 @@ with gr.Blocks(css=CSS) as demo:
|
|
| 193 |
height=500,
|
| 194 |
show_label=False,
|
| 195 |
render_markdown=True,
|
| 196 |
-
value=[] #
|
|
|
|
| 197 |
)
|
| 198 |
|
| 199 |
with gr.Row():
|
|
@@ -201,8 +204,7 @@ with gr.Blocks(css=CSS) as demo:
|
|
| 201 |
label="Message",
|
| 202 |
placeholder="Type your message...",
|
| 203 |
container=False,
|
| 204 |
-
scale=4
|
| 205 |
-
clear_on_submit=True # 提交後清空輸入框
|
| 206 |
)
|
| 207 |
submit_btn = gr.Button("Send", variant='primary', scale=1)
|
| 208 |
|
|
|
|
| 17 |
print(f"Command succeeded: {command}")
|
| 18 |
print(result.stdout)
|
| 19 |
|
| 20 |
+
run_command('pip install openai')
|
| 21 |
+
|
| 22 |
# Model configuration
|
| 23 |
MODEL_ID = "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"
|
| 24 |
QUANT = "Q5_K_M"
|
|
|
|
| 195 |
height=500,
|
| 196 |
show_label=False,
|
| 197 |
render_markdown=True,
|
| 198 |
+
value=[], # 初始值為空列表
|
| 199 |
+
type="messages" # 指定使用 messages 格式
|
| 200 |
)
|
| 201 |
|
| 202 |
with gr.Row():
|
|
|
|
| 204 |
label="Message",
|
| 205 |
placeholder="Type your message...",
|
| 206 |
container=False,
|
| 207 |
+
scale=4
|
|
|
|
| 208 |
)
|
| 209 |
submit_btn = gr.Button("Send", variant='primary', scale=1)
|
| 210 |
|