Toya0421 commited on
Commit
232fa70
·
verified ·
1 Parent(s): fa476cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -2
app.py CHANGED
@@ -407,8 +407,22 @@ def finish_or_retire(pages_json, current_page, pid, orig_lev, action):
407
  # ======================================================
408
  # UI
409
  # ======================================================
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410
 
411
- with gr.Blocks() as demo:
412
  gr.Markdown("# 📚 Reading Exercise")
413
 
414
  student_id_input = gr.Textbox(label="学生番号(必須)")
@@ -420,7 +434,12 @@ with gr.Blocks() as demo:
420
 
421
  start_btn = gr.Button("スタート")
422
 
423
- text_display = gr.Textbox(label="教材", lines=18, interactive=False)
 
 
 
 
 
424
  page_display = gr.Textbox(label="進行状況", lines=1, interactive=False)
425
 
426
  hidden_pages = gr.Textbox(visible=False)
 
407
  # ======================================================
408
  # UI
409
  # ======================================================
410
+ custom_css = """
411
+ .big-text {
412
+ font-size: 20px !important;
413
+ line-height: 1.8 !important;
414
+ font-family: "Noto Sans", sans-serif !important;
415
+ }
416
+
417
+ .reading-area {
418
+ background-color: #fafafa;
419
+ padding: 20px;
420
+ border-radius: 10px;
421
+ border: 1px solid #ddd;
422
+ }
423
+ """
424
 
425
+ with gr.Blocks(css=custom_css) as demo:
426
  gr.Markdown("# 📚 Reading Exercise")
427
 
428
  student_id_input = gr.Textbox(label="学生番号(必須)")
 
434
 
435
  start_btn = gr.Button("スタート")
436
 
437
+ text_display = gr.Textbox(
438
+ label="教材",
439
+ lines=18,
440
+ interactive=False,
441
+ elem_classes=["big-text", "reading-area"]
442
+ )
443
  page_display = gr.Textbox(label="進行状況", lines=1, interactive=False)
444
 
445
  hidden_pages = gr.Textbox(visible=False)