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

Pass port in from cmd. If not passed, default to 5000 (it's the Flask default) #302

Merged
merged 7 commits into from
Apr 19, 2024

Conversation

Olivia-liu
Copy link
Contributor

@Olivia-liu Olivia-liu commented Apr 19, 2024

Tested both cases work:

Specify a port

(torchchat-april-18) (torchchat) olivialpx@olivialpx-mbp torchchat % python torchchat.py browser --device cpu --checkpoint-path ${MODEL_PATH} --temperature 0 --num-samples 10 --port 5001
 * Serving Flask app 'chat_in_browser:create_app("--device", "cpu", "--checkpoint-path", "checkpoints/stories15M/stories15M.pt", "--temperature", "0", "--num-samples", "10", "--chat")'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:5001

Use default port

(torchchat-april-18) (torchchat) olivialpx@olivialpx-mbp torchchat % python torchchat.py browser --device cpu --checkpoint-path ${MODEL_PATH} --temperature 0 --num-samples 10
 * Serving Flask app 'chat_in_browser:create_app("--device", "cpu", "--checkpoint-path", "checkpoints/stories15M/stories15M.pt", "--temperature", "0", "--num-samples", "10", "--chat")'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:5000

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 19, 2024
@Olivia-liu Olivia-liu requested review from byjlw and mikekgfb April 19, 2024 18:38
Copy link
Contributor

@mikekgfb mikekgfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@mikekgfb mikekgfb merged commit 87a561f into main Apr 19, 2024
17 checks passed
@malfet malfet deleted the port-in-command branch April 30, 2024 16:57
malfet pushed a commit that referenced this pull request Jul 17, 2024
… default) (#302)

* chat in browser

* pass port in as an arg

* more comment
malfet pushed a commit that referenced this pull request Jul 17, 2024
… default) (#302)

* chat in browser

* pass port in as an arg

* more comment
malfet pushed a commit that referenced this pull request Jul 17, 2024
… default) (#302)

* chat in browser

* pass port in as an arg

* more comment
malfet pushed a commit that referenced this pull request Jul 17, 2024
… default) (#302)

* chat in browser

* pass port in as an arg

* more comment
malfet pushed a commit that referenced this pull request Jul 17, 2024
… default) (#302)

* chat in browser

* pass port in as an arg

* more comment
malfet pushed a commit that referenced this pull request Jul 17, 2024
… default) (#302)

* chat in browser

* pass port in as an arg

* more comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants