SarahXia0405 commited on
Commit
9994155
·
verified ·
1 Parent(s): ba866ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -31
app.py CHANGED
@@ -422,10 +422,11 @@ with gr.Blocks(
422
  """
423
  )
424
 
 
425
  # === Center Main ===
426
  with gr.Column(scale=3):
427
 
428
- # 1) Instruction + Chat
429
  gr.Markdown(
430
  """
431
  <div style="background-color:#f9fafb; padding:10px; border-radius:5px; margin-top:10px; font-size:0.9em; color:#555;">
@@ -452,7 +453,7 @@ with gr.Blocks(
452
  interactive=False,
453
  )
454
 
455
- # 2) Upload / File type / Memory Line(从原来的 Top Control Row 拿下来放在 chat 下面)
456
  with gr.Row():
457
  with gr.Column(scale=2):
458
  syllabus_file = gr.File(
@@ -472,7 +473,10 @@ with gr.Blocks(
472
  )
473
  gr.HTML("<div style='height:5px'></div>")
474
  docs_btn = gr.Button(
475
- "📂 Loaded Docs", size="sm", variant="secondary", interactive=False
 
 
 
476
  )
477
  with gr.Column(scale=2):
478
  with gr.Group(elem_classes="memory-line-box"):
@@ -493,38 +497,14 @@ with gr.Blocks(
493
  """
494
  )
495
  review_btn = gr.Button(
496
- "Review Now", size="sm", variant="primary", interactive=False
 
 
 
497
  )
498
  session_status = gr.Markdown(visible=False)
499
 
500
 
501
-
502
- # Chat instruction(主聊天框上方提示 Module10 已预加载)
503
- gr.Markdown(
504
- """
505
- <div style="background-color:#f9fafb; padding:10px; border-radius:5px; margin-top:10px; font-size:0.9em; color:#555;">
506
- ✦ <b>Instruction:</b> This prototype is <b>pre-loaded</b> with <b>Module 10 – Responsible AI (Alto, 2024, Chapter 12)</b>.<br>
507
- ✦ You do <b>not</b> need to upload files (uploads are optional).<br>
508
- ✦ Please log in on the right before chatting with Clare.
509
- </div>
510
- """
511
- )
512
- chatbot = gr.Chatbot(
513
- label="",
514
- height=450,
515
- avatar_images=(None, CLARE_LOGO_PATH),
516
- show_label=False,
517
- bubble_full_width=False,
518
- )
519
- user_input = gr.Textbox(
520
- label="Your Input",
521
- placeholder="Please log in on the right before asking Clare anything...",
522
- show_label=False,
523
- container=True,
524
- autofocus=False,
525
- interactive=False,
526
- )
527
-
528
  # === Right Sidebar ===
529
  with gr.Column(scale=1, min_width=180):
530
  with gr.Group(elem_classes="login-panel"):
 
422
  """
423
  )
424
 
425
+
426
  # === Center Main ===
427
  with gr.Column(scale=3):
428
 
429
+ # 1) Instruction + Chat 在最上方
430
  gr.Markdown(
431
  """
432
  <div style="background-color:#f9fafb; padding:10px; border-radius:5px; margin-top:10px; font-size:0.9em; color:#555;">
 
453
  interactive=False,
454
  )
455
 
456
+ # 2) Upload / File type / Memory Line 放到聊天框下面
457
  with gr.Row():
458
  with gr.Column(scale=2):
459
  syllabus_file = gr.File(
 
473
  )
474
  gr.HTML("<div style='height:5px'></div>")
475
  docs_btn = gr.Button(
476
+ "📂 Loaded Docs",
477
+ size="sm",
478
+ variant="secondary",
479
+ interactive=False,
480
  )
481
  with gr.Column(scale=2):
482
  with gr.Group(elem_classes="memory-line-box"):
 
497
  """
498
  )
499
  review_btn = gr.Button(
500
+ "Review Now",
501
+ size="sm",
502
+ variant="primary",
503
+ interactive=False,
504
  )
505
  session_status = gr.Markdown(visible=False)
506
 
507
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
508
  # === Right Sidebar ===
509
  with gr.Column(scale=1, min_width=180):
510
  with gr.Group(elem_classes="login-panel"):