Skip to content

add python api_predict for quick start - #876

Merged
reyoung merged 3 commits into
PaddlePaddle:developfrom
jacquesqiao:develop
Dec 15, 2016
Merged

reyoung merged 3 commits into
PaddlePaddle:developfrom
jacquesqiao:develop

Conversation

@jacquesqiao

Copy link
Copy Markdown
Collaborator

No description provided.

@jacquesqiao
jacquesqiao requested a review from reyoung December 14, 2016 04:41
@jacquesqiao jacquesqiao self-assigned this Dec 14, 2016
@reyoung

reyoung commented Dec 14, 2016

Copy link
Copy Markdown
Collaborator

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

@reyoung reyoung left a comment

Copy link
Copy Markdown
Collaborator

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.

@reyoung reyoung left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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

Comment thread demo/quick_start/api_predict.py Outdated
[label, text] = line.split("\t")
labels.append(int(label))
batch.append([predict.get_index(text)])
print("lables is:")

Copy link
Copy Markdown
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