Skip to content

Commit 676fb59

Browse files
feat(webui): update gradio webui
1 parent 75c2c7f commit 676fb59

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

webui/app.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,33 +101,41 @@ def sum_tokens(client):
101101
pipeline = [
102102
{
103103
"name": "read",
104+
"op_key": "read",
104105
"params": {
105106
"input_file": params.upload_file,
106107
},
107108
},
108109
{
109110
"name": "chunk",
111+
"deps": ["read"],
112+
"op_key": "chunk",
110113
"params": {
111114
"chunk_size": params.chunk_size,
112115
"chunk_overlap": params.chunk_overlap,
113116
},
114117
},
115118
{
116119
"name": "build_kg",
120+
"deps": ["chunk"],
121+
"op_key": "build_kg",
117122
},
118123
]
119124

120125
if params.if_trainee_model:
121126
pipeline.append(
122127
{
123128
"name": "quiz_and_judge",
129+
"deps": ["build_kg"],
130+
"op_key": "quiz_and_judge",
124131
"params": {"quiz_samples": params.quiz_samples, "re_judge": True},
125132
}
126133
)
127134
pipeline.append(
128135
{
129136
"name": "partition",
130137
"deps": ["quiz_and_judge"],
138+
"op_key": "partition",
131139
"params": {
132140
"method": params.partition_method,
133141
"method_params": partition_params,
@@ -138,6 +146,8 @@ def sum_tokens(client):
138146
pipeline.append(
139147
{
140148
"name": "partition",
149+
"deps": ["build_kg"],
150+
"op_key": "partition",
141151
"params": {
142152
"method": params.partition_method,
143153
"method_params": partition_params,
@@ -147,6 +157,8 @@ def sum_tokens(client):
147157
pipeline.append(
148158
{
149159
"name": "generate",
160+
"deps": ["partition"],
161+
"op_key": "generate",
150162
"params": {
151163
"method": params.mode,
152164
"data_format": params.data_format,

0 commit comments

Comments
 (0)