-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
add python api_predict for quick start #876
Conversation
@jacquesqiao Maybe you need to read PR #874 's guide for contributing. We use pre-commit hook to format code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically LGTM. I will run this demo manually before merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tiny things should be fixed.
@@ -0,0 +1,30 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add exe flag for this file.
chmod +x api_predict.sh
[label, text] = line.split("\t") | ||
labels.append(int(label)) | ||
batch.append([predict.get_index(text)]) | ||
print("lables is:") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print('label is:')
=> print 'label is:'
* add random seed for ernie_ie tests
No description provided.