Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -142,7 +142,6 @@ def on_row_select(evt: gr.SelectData, df: pd.DataFrame) -> str:
|
|
142 |
row_idx = evt.index[0] if isinstance(evt.index, (list, tuple)) else evt.index
|
143 |
row = df.iloc[int(row_idx)]
|
144 |
row_id = int(row["id"])
|
145 |
-
# 透過 df 的 shape 來判斷是哪張表(也可改成傳 flag)
|
146 |
if row_id in reading_test_id2data_str.keys():
|
147 |
# 閱讀測驗
|
148 |
return reading_test_id2data_str[row_id]
|
|
|
142 |
row_idx = evt.index[0] if isinstance(evt.index, (list, tuple)) else evt.index
|
143 |
row = df.iloc[int(row_idx)]
|
144 |
row_id = int(row["id"])
|
|
|
145 |
if row_id in reading_test_id2data_str.keys():
|
146 |
# 閱讀測驗
|
147 |
return reading_test_id2data_str[row_id]
|