mafada33 commited on
Commit
55f774a
·
verified ·
1 Parent(s): 7489bc8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -10,10 +10,10 @@ def arrange_seating(input_data):
10
  total_seats = 32
11
  empty_seats = total_seats - len(students)
12
 
13
- # 如果學生數量少於32,補充空位
14
  if empty_seats > 0:
15
- students.extend(['空位'] * empty_seats)
16
-
17
  # 隨機打亂學生列表
18
  random.shuffle(students)
19
 
@@ -39,3 +39,4 @@ with gr.Blocks() as demo:
39
 
40
  # 啟動 Gradio 應用
41
  demo.launch()
 
 
10
  total_seats = 32
11
  empty_seats = total_seats - len(students)
12
 
13
+ # 如果學生數量少於32,補充空位(使用占位符代替空位)
14
  if empty_seats > 0:
15
+ students.extend(['-'] * empty_seats) # 用 '-' 來佔位,避免空格
16
+
17
  # 隨機打亂學生列表
18
  random.shuffle(students)
19
 
 
39
 
40
  # 啟動 Gradio 應用
41
  demo.launch()
42
+