Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -62,14 +62,7 @@ def generate_stream(prompt):
|
|
62 |
yield result,"" # 把逐步結果傳給 output textbox
|
63 |
yield result, tps_result
|
64 |
|
65 |
-
with gr.Blocks(
|
66 |
-
#scrollbox textarea {
|
67 |
-
overflow-y: auto !important;
|
68 |
-
height: 300px !important;
|
69 |
-
resize: none;
|
70 |
-
white-space: pre-wrap;
|
71 |
-
}
|
72 |
-
""") as demo:
|
73 |
gr.Markdown("## 🧠 OpenVINO Streaming Demo with Gradio Textbox")
|
74 |
|
75 |
with gr.Row():
|
@@ -82,8 +75,9 @@ with gr.Blocks(css="""
|
|
82 |
end_btn.click(fn=finish_chat, outputs=status_box)
|
83 |
|
84 |
textbox_input = gr.Textbox(label="Prompt", lines=1, placeholder="Enter prompt here...")
|
85 |
-
textbox_output = gr.Textbox(label="Output", elem_id="scrollbox", lines=10)
|
86 |
-
|
|
|
87 |
# 按鈕控制觸發推論
|
88 |
button = gr.Button("Submit")
|
89 |
|
|
|
62 |
yield result,"" # 把逐步結果傳給 output textbox
|
63 |
yield result, tps_result
|
64 |
|
65 |
+
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
gr.Markdown("## 🧠 OpenVINO Streaming Demo with Gradio Textbox")
|
67 |
|
68 |
with gr.Row():
|
|
|
75 |
end_btn.click(fn=finish_chat, outputs=status_box)
|
76 |
|
77 |
textbox_input = gr.Textbox(label="Prompt", lines=1, placeholder="Enter prompt here...")
|
78 |
+
#textbox_output = gr.Textbox(label="Output", elem_id="scrollbox", lines=10)
|
79 |
+
textbox_output = gr.Markdown(min_height=30, label="robot answer:")
|
80 |
+
|
81 |
# 按鈕控制觸發推論
|
82 |
button = gr.Button("Submit")
|
83 |
|