Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -166,20 +166,20 @@ with gr.Blocks() as iface:
|
|
166 |
|
167 |
with gr.Row():
|
168 |
user_input = gr.Textbox(label='輸入您的問題', placeholder="在此輸入問題...")
|
169 |
-
submit_button = gr.Button("
|
170 |
|
171 |
gr.Examples(examples=examples, inputs=user_input)
|
172 |
|
173 |
with gr.Row():
|
174 |
-
like_button = gr.Button("👍")
|
175 |
-
dislike_button = gr.Button("👎")
|
176 |
improvement_input = gr.Textbox(label='請輸入改進建議', placeholder='請輸入如何改進模型回應的建議')
|
177 |
|
178 |
with gr.Row():
|
179 |
-
feedback_output = gr.Textbox(label='
|
180 |
with gr.Row():
|
181 |
-
show_feedback_button = gr.Button("
|
182 |
-
feedback_display = gr.JSON(label='
|
183 |
|
184 |
def chat(user_input, history):
|
185 |
response = handle_user_input(user_input)
|
|
|
166 |
|
167 |
with gr.Row():
|
168 |
user_input = gr.Textbox(label='輸入您的問題', placeholder="在此輸入問題...")
|
169 |
+
submit_button = gr.Button("問題輸入好,請點我送出")
|
170 |
|
171 |
gr.Examples(examples=examples, inputs=user_input)
|
172 |
|
173 |
with gr.Row():
|
174 |
+
like_button = gr.Button(" 👍 覺得答案很棒,請按我;或者直接繼續問新問題亦可")
|
175 |
+
dislike_button = gr.Button(" 👎 覺得答案待改善,請將更好的答案輸入改進建議,再按我送出保存")
|
176 |
improvement_input = gr.Textbox(label='請輸入改進建議', placeholder='請輸入如何改進模型回應的建議')
|
177 |
|
178 |
with gr.Row():
|
179 |
+
feedback_output = gr.Textbox(label='反饋結果執行狀態', interactive=False)
|
180 |
with gr.Row():
|
181 |
+
show_feedback_button = gr.Button("查看目前所有反饋記錄")
|
182 |
+
feedback_display = gr.JSON(label='所有反饋記錄')
|
183 |
|
184 |
def chat(user_input, history):
|
185 |
response = handle_user_input(user_input)
|