Update app.py
Browse files
app.py
CHANGED
@@ -49,9 +49,22 @@ with gr.Blocks() as demo:
|
|
49 |
title="DeepSeek-R1-Distill-Qwen-1.5B-openvino",
|
50 |
description="回傳輸入內容的測試 API",
|
51 |
)
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
if __name__ == "__main__":
|
55 |
print("Launching Gradio app...")
|
56 |
-
demo.queue(api_open=True, max_size=1)
|
57 |
demo.launch(server_name="0.0.0.0", server_port=7860, share=True)
|
|
|
49 |
title="DeepSeek-R1-Distill-Qwen-1.5B-openvino",
|
50 |
description="回傳輸入內容的測試 API",
|
51 |
)
|
52 |
+
|
53 |
+
def maxtest(prompt):
|
54 |
+
return prompt
|
55 |
+
|
56 |
+
# 定義隱藏的 API 介面(不會 render 到 UI)
|
57 |
+
hidden_api = gr.Interface(
|
58 |
+
fn=maxtest,
|
59 |
+
inputs=gr.Textbox(label="Prompt"),
|
60 |
+
outputs="text",
|
61 |
+
api_name="/maxtest",
|
62 |
+
title="MaxTest API",
|
63 |
+
description="回傳輸入內容的測試 API",
|
64 |
+
visible=False
|
65 |
+
)
|
66 |
+
|
67 |
|
68 |
if __name__ == "__main__":
|
69 |
print("Launching Gradio app...")
|
|
|
70 |
demo.launch(server_name="0.0.0.0", server_port=7860, share=True)
|