Update app.py
Browse files
app.py
CHANGED
|
@@ -52,12 +52,12 @@ with gr.Blocks() as demo:
|
|
| 52 |
|
| 53 |
# --- Nhóm các thành phần xuất kết quả ---
|
| 54 |
with gr.Column():
|
| 55 |
-
debug_output = gr.Textbox(label="Thông tin đánh giá", show_copy_button=True)
|
| 56 |
attitude_output = gr.Textbox(label="Thái độ", show_copy_button=True)
|
| 57 |
knowleadge_output = gr.Textbox(label="Kiến thức", show_copy_button=True)
|
| 58 |
skill_output = gr.Textbox(label="Kỹ năng", show_copy_button=True)
|
| 59 |
interaction_output = gr.Textbox(label="Tương tác", show_copy_button=True)
|
| 60 |
-
detail_output = gr.Textbox(label="Chi tiết", show_copy_button=True)
|
| 61 |
|
| 62 |
greet_btn = gr.Button("Tạo nhận xét")
|
| 63 |
|
|
@@ -107,15 +107,15 @@ with gr.Blocks() as demo:
|
|
| 107 |
result = chain.invoke({"query": full_sentence})
|
| 108 |
|
| 109 |
return {
|
| 110 |
-
debug_output: full_sentence.strip(),
|
| 111 |
attitude_output: result['atitude'],
|
| 112 |
knowleadge_output: result['knowleadge'],
|
| 113 |
skill_output: result['skill'],
|
| 114 |
interaction_output: result['interaction'],
|
| 115 |
-
detail_output: result['detail']
|
| 116 |
}
|
| 117 |
|
| 118 |
-
greet_btn.click(gen, inputs=[*attitude_components, *knowleadge_components, *skill_components, *interaction_components], outputs=[
|
| 119 |
|
| 120 |
if __name__ == "__main__":
|
| 121 |
demo.launch(auth=('admin', 'vuihoc.vn'))
|
|
|
|
| 52 |
|
| 53 |
# --- Nhóm các thành phần xuất kết quả ---
|
| 54 |
with gr.Column():
|
| 55 |
+
# debug_output = gr.Textbox(label="Thông tin đánh giá", show_copy_button=True)
|
| 56 |
attitude_output = gr.Textbox(label="Thái độ", show_copy_button=True)
|
| 57 |
knowleadge_output = gr.Textbox(label="Kiến thức", show_copy_button=True)
|
| 58 |
skill_output = gr.Textbox(label="Kỹ năng", show_copy_button=True)
|
| 59 |
interaction_output = gr.Textbox(label="Tương tác", show_copy_button=True)
|
| 60 |
+
# detail_output = gr.Textbox(label="Chi tiết", show_copy_button=True)
|
| 61 |
|
| 62 |
greet_btn = gr.Button("Tạo nhận xét")
|
| 63 |
|
|
|
|
| 107 |
result = chain.invoke({"query": full_sentence})
|
| 108 |
|
| 109 |
return {
|
| 110 |
+
# debug_output: full_sentence.strip(),
|
| 111 |
attitude_output: result['atitude'],
|
| 112 |
knowleadge_output: result['knowleadge'],
|
| 113 |
skill_output: result['skill'],
|
| 114 |
interaction_output: result['interaction'],
|
| 115 |
+
# detail_output: result['detail']
|
| 116 |
}
|
| 117 |
|
| 118 |
+
greet_btn.click(gen, inputs=[*attitude_components, *knowleadge_components, *skill_components, *interaction_components], outputs=[attitude_output, knowleadge_output, skill_output, interaction_output])
|
| 119 |
|
| 120 |
if __name__ == "__main__":
|
| 121 |
demo.launch(auth=('admin', 'vuihoc.vn'))
|