Arviano commited on
Commit
628b871
Β·
verified Β·
1 Parent(s): 3a6827d

chore: hide analytics panel

Browse files
Files changed (1) hide show
  1. app.py +25 -25
app.py CHANGED
@@ -337,32 +337,32 @@ with gr.Blocks(fill_height=True, fill_width=True,
337
  send_btn = gr.Button("Kirim", variant="primary", scale=1)
338
  new_btn = gr.Button("Perbincangan baru")
339
 
340
- with gr.Accordion("πŸ“Š Chat History Browser", open=True):
341
- email_dropdown = gr.Dropdown(
342
- choices=[],
343
- label="Pilih email pengguna",
344
- interactive=True,
345
- info="Pilih alamat email untuk melihat riwayat percakapan",
346
- )
347
- refresh_btn = gr.Button("πŸ”„ Refresh daftar email")
348
- load_btn = gr.Button("πŸ“‚ Tampilkan percakapan")
349
- result_json = gr.JSON(label="Riwayat Chat")
350
-
351
- def get_emails():
352
- with SessionLocal() as s:
353
- return gr.update(choices=[u.email for u in s.query(User.email).all()])
354
 
355
- refresh_btn.click(
356
- get_emails,
357
- inputs=[],
358
- outputs=[email_dropdown]
359
- )
360
-
361
- load_btn.click(
362
- lambda selected_email: analytics_snapshot(selected_email),
363
- inputs=[email_dropdown],
364
- outputs=result_json
365
- )
366
 
367
  # # RIGHT: Sources panel (ini bisa untuk nunjukkin source2nya tapi so far masih belum diimplement)
368
  # with gr.Column(scale=1):
 
337
  send_btn = gr.Button("Kirim", variant="primary", scale=1)
338
  new_btn = gr.Button("Perbincangan baru")
339
 
340
+ # with gr.Accordion("πŸ“Š Chat History Browser", open=True):
341
+ # email_dropdown = gr.Dropdown(
342
+ # choices=[],
343
+ # label="Pilih email pengguna",
344
+ # interactive=True,
345
+ # info="Pilih alamat email untuk melihat riwayat percakapan",
346
+ # )
347
+ # refresh_btn = gr.Button("πŸ”„ Refresh daftar email")
348
+ # load_btn = gr.Button("πŸ“‚ Tampilkan percakapan")
349
+ # result_json = gr.JSON(label="Riwayat Chat")
350
+
351
+ # def get_emails():
352
+ # with SessionLocal() as s:
353
+ # return gr.update(choices=[u.email for u in s.query(User.email).all()])
354
 
355
+ # refresh_btn.click(
356
+ # get_emails,
357
+ # inputs=[],
358
+ # outputs=[email_dropdown]
359
+ # )
360
+
361
+ # load_btn.click(
362
+ # lambda selected_email: analytics_snapshot(selected_email),
363
+ # inputs=[email_dropdown],
364
+ # outputs=result_json
365
+ # )
366
 
367
  # # RIGHT: Sources panel (ini bisa untuk nunjukkin source2nya tapi so far masih belum diimplement)
368
  # with gr.Column(scale=1):