Update app.py
Browse files
app.py
CHANGED
|
@@ -43,21 +43,11 @@ with gr.Blocks() as demo:
|
|
| 43 |
with gr.TabItem("聊天"):
|
| 44 |
chat = gr.ChatInterface(
|
| 45 |
fn=respond,
|
|
|
|
| 46 |
title="聊天介面",
|
| 47 |
description="DeepSeek-R1-Distill-Qwen-1.5B-openvino 聊天接口"
|
| 48 |
)
|
| 49 |
-
|
| 50 |
-
hidden_api = gr.Interface(
|
| 51 |
-
fn=respond,
|
| 52 |
-
inputs=gr.Textbox(label="Prompt"),
|
| 53 |
-
outputs="text",
|
| 54 |
-
api_name="/hchat",
|
| 55 |
-
title="MaxTest API",
|
| 56 |
-
description="回傳輸入內容的測試 API",
|
| 57 |
-
visible=False
|
| 58 |
-
)
|
| 59 |
-
# 使用 .render() 將 hidden_api 組件加入佈局,雖然 UI 不會顯示,但 API 端點仍會註冊
|
| 60 |
-
#hidden_api.render()
|
| 61 |
|
| 62 |
if __name__ == "__main__":
|
| 63 |
print("Launching Gradio app...")
|
|
|
|
| 43 |
with gr.TabItem("聊天"):
|
| 44 |
chat = gr.ChatInterface(
|
| 45 |
fn=respond,
|
| 46 |
+
api_name="/hchat",
|
| 47 |
title="聊天介面",
|
| 48 |
description="DeepSeek-R1-Distill-Qwen-1.5B-openvino 聊天接口"
|
| 49 |
)
|
| 50 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
if __name__ == "__main__":
|
| 53 |
print("Launching Gradio app...")
|