add project files
Browse files- app.py +1 -1
- src/gr_func.py +1 -1
app.py
CHANGED
@@ -43,7 +43,7 @@ with gr.Blocks() as demo:
|
|
43 |
with gr.Row():
|
44 |
with gr.Column():
|
45 |
with gr.Accordion("丹药限制",open=False):
|
46 |
-
medicine_select_acc = gr.Radio(["ALL","
|
47 |
medicine_select = gr.Dropdown(choices=medicine_list_init,value=medicine_list_init[0],label="丹药选择")
|
48 |
|
49 |
with gr.Row():
|
|
|
43 |
with gr.Row():
|
44 |
with gr.Column():
|
45 |
with gr.Accordion("丹药限制",open=False):
|
46 |
+
medicine_select_acc = gr.Radio(["ALL","回复状态", "突破概率", "加攻击力"],value="ALL",show_label=False)
|
47 |
medicine_select = gr.Dropdown(choices=medicine_list_init,value=medicine_list_init[0],label="丹药选择")
|
48 |
|
49 |
with gr.Row():
|
src/gr_func.py
CHANGED
@@ -6,7 +6,7 @@ medicine_table = db.table('medicine')
|
|
6 |
|
7 |
|
8 |
def get_medicines(type="ALL"):
|
9 |
-
assert type in ["ALL", "
|
10 |
if type in ["ALL"]:
|
11 |
a = medicine_table.all()
|
12 |
else:
|
|
|
6 |
|
7 |
|
8 |
def get_medicines(type="ALL"):
|
9 |
+
assert type in ["ALL", "回复状态", "突破概率", "加攻击力"], f"type:{type} 不是有效的类别"
|
10 |
if type in ["ALL"]:
|
11 |
a = medicine_table.all()
|
12 |
else:
|