Skip to content

Commit ef74816

Browse files
authored
Merge pull request #10 from tomseimandi/master
Keep order of input for label output
2 parents cbeb0f2 + f08e670 commit ef74816

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async def predict_label(q: List[str] = Query(..., title="query string", descript
6363

6464
for nomenclature in n:
6565
output[nomenclature] = {}
66-
descriptions = list(set(q))
66+
descriptions = sorted(set(q), key=q.index)
6767
preprocessed_descriptions = [preprocess_text(description) for description in descriptions]
6868
preds = predict_using_model(preprocessed_descriptions, model=models[nomenclature], k=k)
6969
if v:

0 commit comments

Comments
 (0)