Upload app_federal.py
Browse files- app_federal.py +5 -4
app_federal.py
CHANGED
@@ -330,12 +330,13 @@ def run_retrieval(query):
|
|
330 |
#print (out_dict[:50])
|
331 |
res = {"result_type":"chatgpt_reranking"}
|
332 |
res["query"] = query
|
333 |
-
res["input_reranking"] = [i["index"] for i in out_dict]
|
334 |
-
res["scores_input_reranking"] = [i["NV_score"] for i in out_dict]
|
335 |
out_dict = rerank_with_chatGPT(query, out_dict)[:NUM_RESULTS]
|
336 |
|
337 |
-
res["output_reranking"] = [i["index"] for i in out_dict]
|
338 |
-
res["scores_output_reranking"] = [i["NV_score"] for i in out_dict]
|
|
|
339 |
|
340 |
# is that already good?
|
341 |
with scheduler.lock:
|
|
|
330 |
#print (out_dict[:50])
|
331 |
res = {"result_type":"chatgpt_reranking"}
|
332 |
res["query"] = query
|
333 |
+
res["input_reranking"] = [int(i["index"]) for i in out_dict]
|
334 |
+
res["scores_input_reranking"] = [float(i["NV_score"]) for i in out_dict]
|
335 |
out_dict = rerank_with_chatGPT(query, out_dict)[:NUM_RESULTS]
|
336 |
|
337 |
+
res["output_reranking"] = [int(i["index"]) for i in out_dict]
|
338 |
+
res["scores_output_reranking"] = [float(i["NV_score"]) for i in out_dict]
|
339 |
+
print (res)
|
340 |
|
341 |
# is that already good?
|
342 |
with scheduler.lock:
|