
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Performs sentiment analysis on a string - containerised and deployed on Docker Hub & Azure
Name Stmts Miss Cover
---------------------------------------------------
opinion_miner_api/__init__.py 0 0 100%
opinion_miner_api/main.py 23 0 100%
opinion_miner_api/model.py 73 9 88%
tests/test_api.py 48 0 100%
tests/test_main.py 11 0 100%
tests/test_model.py 8 0 100%
---------------------------------------------------
TOTAL 163 9 94%
Clone the repository:
git clone https://github.com/yourusername/opinion-miner-api.git
cd opinion-miner-api
Create and activate a virtual environment:
python -m venv venv-opinion-miner-api
source venv-opinion-miner-api/bin/activate # On Windows use `venv-opinion-miner-api\Scripts\activate`
Install the dependencies:
pip install -r requirements.txt # NOTE: torch CPU installation
Run the application:
uvicorn opinion_miner_api.main:app --host 0.0.0.0 --port 8000
Run the tests (optional):
pytest --cov=opinion_miner_api tests/
Build the Docker image (optional):
docker build -t opinion-miner-api .
Run the Docker container (optional):
docker run -p 8000:8000 opinion-miner-api
Test the API (optional):
curl -X POST "http://localhost:8000/predict" -H "Content-Type: application/json" -d '{"text":"I love Docker!"}'
FAQs
Performs sentiment analysis on a string - containerised and deployed on Docker Hub & Azure
We found that opinion-miner-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.