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

Server #5

Merged
merged 6 commits into from Sep 17, 2017
Merged

Server #5

merged 6 commits into from Sep 17, 2017

Conversation

@daemon
Copy link
Member

daemon commented Sep 17, 2017

Exposes model via REST API. Also added example client.

Copy link
Member

tuzhucheng left a comment

Curious about choice of CherryPy over Flask.

LGTM after comments addressed.

predictions, = self.sess.run(output, {"wav_data:0": wav_data})
return (self.labels[np.argmax(predictions)], max(predictions))

def json_in(f):

This comment has been minimized.

Copy link
@tuzhucheng

tuzhucheng Sep 17, 2017

Member

4 spaces for indent

This comment has been minimized.

Copy link
@daemon

daemon Sep 17, 2017

Author Member

Oh oops, I copied this from one of my older projects...

parser.add_argument(
"--endpoint",
type=str,
default="http://127.0.0.1:16888",

This comment has been minimized.

Copy link
@tuzhucheng

tuzhucheng Sep 17, 2017

Member

Consider changing this to 0.0.0.0? Not sure if with 127.0.0.1 the client can successfully reach the server on a separate machine.

This comment has been minimized.

Copy link
@daemon

daemon Sep 17, 2017

Author Member

I'm currently port forwarding dragon00:16888 to my local machine using an SSH tunnel

@daemon

This comment has been minimized.

Copy link
Member Author

daemon commented Sep 17, 2017

None in particular, I'm just more familiar with CherryPy.

EDIT: Actually Flask looks more clean for this kind of stuff, I'll switch later.

@tuzhucheng tuzhucheng merged commit c1b4775 into master Sep 17, 2017
@daemon daemon deleted the server branch Sep 17, 2017
daemon added a commit that referenced this pull request Oct 5, 2017
* Add confusing training examples

* Add REST server

- Service for identifying when anserini is spoken

* Add client

* Improve trained model

- Make model more resilient to confusing sounds

* Fix indentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.