Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to get the prediction response from data file . #1

Open
PrAItikPatil94 opened this issue Nov 24, 2018 · 3 comments
Open

Fail to get the prediction response from data file . #1

PrAItikPatil94 opened this issue Nov 24, 2018 · 3 comments

Comments

@PrAItikPatil94
Copy link

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))**
@YoussefAshraf397
Copy link

YoussefAshraf397 commented Mar 18, 2020

@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

@harshadbhale
Copy link

@PrAItikPatil94 hello, pratik is this project working?

@harshadbhale
Copy link

@YoussefAshraf397 is this project working sir?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants