Spaces:
Sleeping
A newer version of the Streamlit SDK is available:
1.40.1
title: SentimentAi
emoji: 💻
colorFrom: gray
colorTo: indigo
sdk: streamlit
sdk_version: 1.36.0
app_file: app.py
pinned: false
license: mit
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Run on docker
UI
docker run -it -p 8501:8501 --platform=linux/amd64
-e LAUNCHDARKLY_SDK_KEY=""
registry.hf.space/asgface-sentimentai:latest streamlit run app.py
API - WIP
Build your Docker image
docker build -t myapi .
Run your Docker container, mapping port 5001 of the container to port 5001 on your host
docker run -p 5001:5001 -e LAUNCHDARKLY_SDK_KEY="<LAUNCHDARKLY_SDK_KEY>" myapi
Run locally
API
python3 -m venv myenv
source myenv/bin/activate
LAUNCHDARKLY_SDK_KEY=$LAUNCHDARKLY_SDK_KEY gunicorn -w 4 -b 0.0.0.0:5001 api:app
Build your Docker image
docker build -t morsisdivine/sentiment .
Run your Docker container, mapping port 5001 of the container to port 5001 on your host
docker run -p 5001:5001 -e LAUNCHDARKLY_SDK_KEY=$LAUNCHDARKLY_SDK_KEY morsisdivine/sentiment
UI
python3 -m venv myenv
source myenv/bin/activate
pip3 install -r requirements.txt
LAUNCHDARKLY_SDK_KEY=$LAUNCHDARKLY_SDK_KEY streamlit run app.py
Run test with pytest and playwright
pytest --html=report.html --browser webkit --tracing on