Typing-Assistant
Typing-Assistant copied to clipboard
Fail to get the prediction response from data file .
When we try to get the prediction after user input , we are unable to get any predictions in html page. Not sure how this json.dumps is working and why two inputs string and work are being used.
@app.route('/output', methods=['GET']) def worker(): #print(request, file=sys.stderr) string = request.args.get('string') work = request.args.get('work') words=string.split() #print(words, file=sys.stderr) n=len(words) if work=='pred': if n==1: #print (bgs_freq[(string)].most_common(5),file=sys.stderr)
**return json.dumps(bgs_freq[(string)].most_common(5))
elif n>1:
#print (tgs_freq[(words[n-2],words[n-1])].most_common(5),file=sys.stderr)
return json.dumps(tgs_freq[(words[n-2],words[n-1])].most_common(5))
else:
return json.dumps(incomplete_pred(words, n))**
@PrAItikPatil94 Hello this problem because of "Redirect has been blocked by cross-validation" you will see that in console form Google Chrom .. You can solve this issue by adding this extension Here
@PrAItikPatil94 hello, pratik is this project working?
@YoussefAshraf397 is this project working sir?