Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -65,22 +65,20 @@ def generate_stream(prompt):
|
|
65 |
with gr.Blocks() as demo:
|
66 |
gr.Markdown("## 🧠 OpenVINO Streaming Demo with Gradio Textbox")
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
-
#with gr.Row():
|
78 |
-
textbox_input = gr.Textbox(label="Prompt", lines=1, placeholder="Enter prompt here...")
|
79 |
-
button = gr.Button("Submit")
|
80 |
-
|
81 |
-
#textbox_output = gr.Textbox(label="Output", elem_id="scrollbox", lines=10)
|
82 |
-
textbox_output = gr.Markdown(min_height=30, label="robot answer:")
|
83 |
-
|
84 |
|
85 |
|
86 |
# 當按鈕被按下時,呼叫 generate_stream 並更新 textbox_output
|
|
|
65 |
with gr.Blocks() as demo:
|
66 |
gr.Markdown("## 🧠 OpenVINO Streaming Demo with Gradio Textbox")
|
67 |
|
68 |
+
with gr.Row():
|
69 |
+
# 左邊:控制按鈕與狀態欄
|
70 |
+
with gr.Column(scale=1):
|
71 |
+
start_btn = gr.Button("開始對話")
|
72 |
+
end_btn = gr.Button("結束對話")
|
73 |
+
textbox_input = gr.Textbox(label="Prompt", lines=1, placeholder="Enter prompt here...")
|
74 |
+
button = gr.Button("Submit")
|
75 |
+
|
76 |
+
# 右邊:Prompt 輸入與 Markdown 輸出
|
77 |
+
with gr.Column(scale=3):
|
78 |
+
status_box = gr.Textbox(label="狀態", interactive=False)
|
79 |
+
TPS_box = gr.Textbox(label="TPS", interactive=False)
|
80 |
+
textbox_output = gr.Markdown(label="robot answer:", elem_id="scroll_output")
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
|
84 |
# 當按鈕被按下時,呼叫 generate_stream 並更新 textbox_output
|