anhkhoiphan commited on
Commit
6fa314d
·
1 Parent(s): d916930

comment phần Giải pháp

Browse files
Files changed (1) hide show
  1. data_indexing.py +54 -54
data_indexing.py CHANGED
@@ -1123,72 +1123,72 @@ def create_indexing_interface():
1123
 
1124
  output_box = gr.Textbox(lines=15, label="📋 Logs", interactive=False)
1125
 
1126
- gr.Markdown("---")
1127
- gr.Markdown("## 🏢 Giải pháp (Solutions)")
1128
 
1129
- with gr.Row():
1130
- gr.Button("GP Ngư nghiệp").click(
1131
- solution_indexing.indexing_single_solution,
1132
- inputs=[gr.State("ngu_nghiep"), gr.State(QDRANT_COLLECTION_NAME_GPNGUNGHIEP)],
1133
- outputs=output_box)
1134
 
1135
- gr.Button("GP Học đường").click(
1136
- solution_indexing.indexing_single_solution,
1137
- inputs=[gr.State("hoc_duong"), gr.State(QDRANT_COLLECTION_NAME_GPHOCDUONG)],
1138
- outputs=output_box)
1139
 
1140
- gr.Button("GP Nhà thông minh").click(
1141
- solution_indexing.indexing_single_solution,
1142
- inputs=[gr.State("nha_thong_minh"), gr.State(QDRANT_COLLECTION_NAME_GPNHATHONGMINH)],
1143
- outputs=output_box)
1144
 
1145
- gr.Button("GP Nông nghiệp CNC").click(
1146
- solution_indexing.indexing_single_solution,
1147
- inputs=[gr.State("nong_nghiep_cnc"), gr.State(QDRANT_COLLECTION_NAME_GPNNCNC)],
1148
- outputs=output_box)
1149
 
1150
- with gr.Row():
1151
- gr.Button("GP Cảnh quan").click(
1152
- solution_indexing.indexing_single_solution,
1153
- inputs=[gr.State("canh_quan"), gr.State(QDRANT_COLLECTION_NAME_GPCANHQUAN)],
1154
- outputs=output_box)
1155
 
1156
- gr.Button("GP HTĐ NLMT").click(
1157
- solution_indexing.indexing_single_solution,
1158
- inputs=[gr.State("nlmt"), gr.State(QDRANT_COLLECTION_NAME_GPNLMT)],
1159
- outputs=output_box)
1160
 
1161
- gr.Button("GP Đường phố").click(
1162
- solution_indexing.indexing_single_solution,
1163
- inputs=[gr.State("duong_pho"), gr.State(QDRANT_COLLECTION_NAME_GPDUONGPHO)],
1164
- outputs=output_box)
1165
 
1166
- gr.Button("GP Văn phòng công sở").click(
1167
- solution_indexing.indexing_single_solution,
1168
- inputs=[gr.State("van_phong_cong_so"), gr.State(QDRANT_COLLECTION_NAME_GPVPCS)],
1169
- outputs=output_box)
1170
 
1171
- with gr.Row():
1172
- gr.Button("GP Nhà máy CN").click(
1173
- solution_indexing.indexing_single_solution,
1174
- inputs=[gr.State("nha_may_cong_nghiep"), gr.State(QDRANT_COLLECTION_NAME_GPNMCN)],
1175
- outputs=output_box)
1176
 
1177
- gr.Button("GP Nhà ở xã hội").click(
1178
- solution_indexing.indexing_single_solution,
1179
- inputs=[gr.State("nha_o_xa_hoi"), gr.State(QDRANT_COLLECTION_NAME_GPNOXH)],
1180
- outputs=output_box)
1181
 
1182
- def index_all_solutions():
1183
- buffer = io.StringIO()
1184
- sys.stdout = buffer
1185
- solution_indexing.run_indexing(reload=True)
1186
- sys.stdout = sys.__stdout__
1187
- return buffer.getvalue()
1188
 
1189
- gr.Button("✨ Tất cả GP", variant="primary").click(
1190
- index_all_solutions,
1191
- outputs=output_box)
1192
 
1193
  gr.Markdown("---")
1194
  gr.Markdown("## 📦 Sản phẩm (Products)")
 
1123
 
1124
  output_box = gr.Textbox(lines=15, label="📋 Logs", interactive=False)
1125
 
1126
+ # gr.Markdown("---")
1127
+ # gr.Markdown("## 🏢 Giải pháp (Solutions)")
1128
 
1129
+ # with gr.Row():
1130
+ # gr.Button("GP Ngư nghiệp").click(
1131
+ # solution_indexing.indexing_single_solution,
1132
+ # inputs=[gr.State("ngu_nghiep"), gr.State(QDRANT_COLLECTION_NAME_GPNGUNGHIEP)],
1133
+ # outputs=output_box)
1134
 
1135
+ # gr.Button("GP Học đường").click(
1136
+ # solution_indexing.indexing_single_solution,
1137
+ # inputs=[gr.State("hoc_duong"), gr.State(QDRANT_COLLECTION_NAME_GPHOCDUONG)],
1138
+ # outputs=output_box)
1139
 
1140
+ # gr.Button("GP Nhà thông minh").click(
1141
+ # solution_indexing.indexing_single_solution,
1142
+ # inputs=[gr.State("nha_thong_minh"), gr.State(QDRANT_COLLECTION_NAME_GPNHATHONGMINH)],
1143
+ # outputs=output_box)
1144
 
1145
+ # gr.Button("GP Nông nghiệp CNC").click(
1146
+ # solution_indexing.indexing_single_solution,
1147
+ # inputs=[gr.State("nong_nghiep_cnc"), gr.State(QDRANT_COLLECTION_NAME_GPNNCNC)],
1148
+ # outputs=output_box)
1149
 
1150
+ # with gr.Row():
1151
+ # gr.Button("GP Cảnh quan").click(
1152
+ # solution_indexing.indexing_single_solution,
1153
+ # inputs=[gr.State("canh_quan"), gr.State(QDRANT_COLLECTION_NAME_GPCANHQUAN)],
1154
+ # outputs=output_box)
1155
 
1156
+ # gr.Button("GP HTĐ NLMT").click(
1157
+ # solution_indexing.indexing_single_solution,
1158
+ # inputs=[gr.State("nlmt"), gr.State(QDRANT_COLLECTION_NAME_GPNLMT)],
1159
+ # outputs=output_box)
1160
 
1161
+ # gr.Button("GP Đường phố").click(
1162
+ # solution_indexing.indexing_single_solution,
1163
+ # inputs=[gr.State("duong_pho"), gr.State(QDRANT_COLLECTION_NAME_GPDUONGPHO)],
1164
+ # outputs=output_box)
1165
 
1166
+ # gr.Button("GP Văn phòng công sở").click(
1167
+ # solution_indexing.indexing_single_solution,
1168
+ # inputs=[gr.State("van_phong_cong_so"), gr.State(QDRANT_COLLECTION_NAME_GPVPCS)],
1169
+ # outputs=output_box)
1170
 
1171
+ # with gr.Row():
1172
+ # gr.Button("GP Nhà máy CN").click(
1173
+ # solution_indexing.indexing_single_solution,
1174
+ # inputs=[gr.State("nha_may_cong_nghiep"), gr.State(QDRANT_COLLECTION_NAME_GPNMCN)],
1175
+ # outputs=output_box)
1176
 
1177
+ # gr.Button("GP Nhà ở xã hội").click(
1178
+ # solution_indexing.indexing_single_solution,
1179
+ # inputs=[gr.State("nha_o_xa_hoi"), gr.State(QDRANT_COLLECTION_NAME_GPNOXH)],
1180
+ # outputs=output_box)
1181
 
1182
+ # def index_all_solutions():
1183
+ # buffer = io.StringIO()
1184
+ # sys.stdout = buffer
1185
+ # solution_indexing.run_indexing(reload=True)
1186
+ # sys.stdout = sys.__stdout__
1187
+ # return buffer.getvalue()
1188
 
1189
+ # gr.Button("✨ Tất cả GP", variant="primary").click(
1190
+ # index_all_solutions,
1191
+ # outputs=output_box)
1192
 
1193
  gr.Markdown("---")
1194
  gr.Markdown("## 📦 Sản phẩm (Products)")