Typing-Assistant icon indicating copy to clipboard operation
Typing-Assistant copied to clipboard

Fail to get the prediction response from data file .

Open PrAItikPatil94 opened this issue 6 years ago • 3 comments

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 avatar Nov 24 '18 08:11 PrAItikPatil94

@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

YoussefAshraf397 avatar Mar 18 '20 19:03 YoussefAshraf397

@PrAItikPatil94 hello, pratik is this project working?

harshadbhale avatar Sep 30 '21 14:09 harshadbhale

@YoussefAshraf397 is this project working sir?

harshadbhale avatar Sep 30 '21 14:09 harshadbhale