update app.py
Browse files- app.py +8 -3
- requirements.txt +1 -1
app.py
CHANGED
@@ -77,10 +77,15 @@ class SearchApplication:
|
|
77 |
|
78 |
for result in sorted(
|
79 |
search_results,
|
80 |
-
key=lambda x: json.loads(x.raw)[
|
81 |
-
|
|
|
|
|
82 |
):
|
83 |
-
|
|
|
|
|
|
|
84 |
description = data_json["description"]
|
85 |
url = data_json["url"]
|
86 |
project_name = data_json["project_name"]
|
|
|
77 |
|
78 |
for result in sorted(
|
79 |
search_results,
|
80 |
+
key=lambda x: json.loads(self.searcher.doc(x.docid).raw())[
|
81 |
+
"stargazers_count"
|
82 |
+
],
|
83 |
+
reverse=True,
|
84 |
):
|
85 |
+
docid = result.docid
|
86 |
+
doc = self.searcher.doc(docid)
|
87 |
+
data_json = json.loads(doc.raw())
|
88 |
+
|
89 |
description = data_json["description"]
|
90 |
url = data_json["url"]
|
91 |
project_name = data_json["project_name"]
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
pyserini
|
2 |
faiss-cpu
|
3 |
torch
|
4 |
altair<5
|
|
|
1 |
+
pyserini
|
2 |
faiss-cpu
|
3 |
torch
|
4 |
altair<5
|