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

add python api_predict for quick start #876

Merged
merged 3 commits into from
Dec 15, 2016

Conversation

jacquesqiao
Copy link
Member

No description provided.

@jacquesqiao jacquesqiao self-assigned this Dec 14, 2016
@reyoung
Copy link
Collaborator

reyoung commented Dec 14, 2016

@jacquesqiao Maybe you need to read PR #874 's guide for contributing. We use pre-commit hook to format code.

Copy link
Collaborator

@reyoung reyoung left a 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.

Copy link
Collaborator

@reyoung reyoung left a 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
Copy link
Collaborator

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:")
Copy link
Collaborator

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:'

@reyoung reyoung merged commit dd894c2 into PaddlePaddle:develop Dec 15, 2016
wangxicoding pushed a commit to wangxicoding/Paddle that referenced this pull request Dec 9, 2021
* add random seed for ernie_ie tests
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

Successfully merging this pull request may close these issues.

2 participants