Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
Testing distributed network
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrevinnoc committed Feb 13, 2021
1 parent 843120e commit 4f10efc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Monad.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from itertools import tee, islice, chain
from nltk.corpus import wordnet
from SPARQLWrapper import SPARQLWrapper, JSON
from polyglot.detect import Detector
# from polyglot.detect import Detector

import os.path, os, shutil, json, random, smtplib, sys, socket, re, mimetypes, datetime, lmdb, hnswlib, time, bson, requests
bson.loads = bson.BSON.decode
Expand Down
4 changes: 4 additions & 0 deletions future.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,8 @@ def _answerPeer():
numberOfPage = request.args.get("numberOfPage", 1, type=int)
minimumScore = request.args.get("minimumScore", 0, type=float)
result = answerPeer(query, q_vec, queryLanguage, numberOfURLs, numberOfPage)
print("max: ", max(result["url_scores"]))
print("min: ", minimumScore)
if max(result["url_scores"]) >= minimumScore:
return jsonify(result=result)
else:
Expand All @@ -862,6 +864,8 @@ def _answerPeerImages():
numberOfPage = request.args.get("numberOfPage", 1, type=int)
minimumScore = request.args.get("minimumScore", 0, type=float)
result = answerPeerImages(query, q_vec, queryLanguage, numberOfURLs, numberOfPage)
print("max:", max(result["images_scores"]))
print("min: ", minimumScore)
if max(result["images_scores"]) >= minimumScore:
return jsonify(result=result)
else:
Expand Down

0 comments on commit 4f10efc

Please sign in to comment.