rreece / venv-torch

An example of setting up a python virtualenv that has pytorch installed

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

venv-torch

CI badge

An example of setting up a python virtualenv that has pytorch installed.

This package also shows examples of loading and using HuggingFace models. So far, all the models used are for NLP.

An analogous project using poetry to manage the virtualenv and its dependencies is poetry-torch.

How to setup

source setup.sh

Run sentiment scoring of your input texts

This test can be run interactively:

cd tests
python test_hf_bert_sentiment.py

Run the tests

Run all the tests:

pytest

Author

Ryan Reece (@rreece)
Created: November 4, 2022

About

An example of setting up a python virtualenv that has pytorch installed

License:MIT License


Languages

Language:Python 87.8%Language:Shell 8.4%Language:Makefile 3.8%