new results
Browse files
app.py
CHANGED
@@ -26,9 +26,6 @@ wmodel = WhisperModel("guillaumekln/faster-whisper-small", device="cpu", compute
|
|
26 |
qdrant_api_key = os.environ.get("qdrant_api_key")
|
27 |
qdrant_url = os.environ.get("qdrant_url")
|
28 |
|
29 |
-
qdrant_api_key = "WaGH94-bo_CzlxTNHFjBAGPvWRhbsWEKUKbMz6YQtYt4oTD1ZXTvwg"
|
30 |
-
qdrant_url = "https://c9bee7c7-2bf3-4e1b-8838-2f6f23372ab5.us-east-1-0.aws.cloud.qdrant.io"
|
31 |
-
|
32 |
client = QdrantClient(url=qdrant_url, port=443, api_key=qdrant_api_key, prefer_grpc=False)
|
33 |
|
34 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
@@ -96,8 +93,7 @@ def search():
|
|
96 |
else:
|
97 |
if 'date' not in r.payload: r.payload['date'] = '20200101'
|
98 |
new_results.append({"text": r.payload['title'], "url": r.payload['url'], "date": r.payload['date'], "id": r.id})
|
99 |
-
|
100 |
-
return jsonify(results)
|
101 |
# except:
|
102 |
# return jsonify([])
|
103 |
|
|
|
26 |
qdrant_api_key = os.environ.get("qdrant_api_key")
|
27 |
qdrant_url = os.environ.get("qdrant_url")
|
28 |
|
|
|
|
|
|
|
29 |
client = QdrantClient(url=qdrant_url, port=443, api_key=qdrant_api_key, prefer_grpc=False)
|
30 |
|
31 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
93 |
else:
|
94 |
if 'date' not in r.payload: r.payload['date'] = '20200101'
|
95 |
new_results.append({"text": r.payload['title'], "url": r.payload['url'], "date": r.payload['date'], "id": r.id})
|
96 |
+
return jsonify(new_results)
|
|
|
97 |
# except:
|
98 |
# return jsonify([])
|
99 |
|