hsuwill000 commited on
Commit
f64f4a5
·
verified ·
1 Parent(s): 66e7a38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -20
app.py CHANGED
@@ -65,27 +65,17 @@ def generate_stream(prompt):
65
 
66
  with gr.Blocks() as demo:
67
  gr.Markdown("## 🧠 OpenVINO Streaming Demo with Gradio Textbox")
68
-
69
  with gr.Row():
70
- # 左邊:控制按鈕與狀態欄
71
- with gr.Column(scale=1):
72
- '''
73
- with gr.Row():
74
- start_btn = gr.Button("開始對話")
75
- end_btn = gr.Button("結束對話")
76
- '''
77
- textbox_input = gr.Textbox(label="Prompt", lines=1, placeholder="Enter prompt here...")
78
- button = gr.Button("Submit")
79
- # 右邊:Prompt 輸入與 Markdown 輸出
80
- with gr.Column(scale=3):
81
- with gr.Row():
82
- with gr.Column(scale=1):
83
- start_btn = gr.Button("開始對話")
84
- end_btn = gr.Button("結束對話")
85
- #with gr.Column(scale=3):
86
- status_box = gr.Textbox(label="狀態", interactive=False)
87
- TPS_box = gr.Textbox(label="TPS", interactive=False)
88
- textbox_output = gr.Markdown(label="robot answer:", elem_id="scroll_output")
89
 
90
  start_btn.click(fn=start_chat, outputs=status_box)
91
  end_btn.click(fn=finish_chat, outputs=status_box)
 
65
 
66
  with gr.Blocks() as demo:
67
  gr.Markdown("## 🧠 OpenVINO Streaming Demo with Gradio Textbox")
 
68
  with gr.Row():
69
+ with gr.Column():
70
+ start_btn = gr.Button("開始對話")
71
+ end_btn = gr.Button("結束對話")
72
+ status_box = gr.Textbox(label="狀態", interactive=False)
73
+ PS_box = gr.Textbox(label="TPS", interactive=False)
74
+ with gr.Row():
75
+ textbox_input = gr.Textbox(label="Prompt", lines=1, placeholder="Enter prompt here...")
76
+ button = gr.Button("Submit")
77
+
78
+ textbox_output = gr.Markdown(label="robot answer:", elem_id="scroll_output")
 
 
 
 
 
 
 
 
 
79
 
80
  start_btn.click(fn=start_chat, outputs=status_box)
81
  end_btn.click(fn=finish_chat, outputs=status_box)