Ruperth commited on
Commit
07b3c1c
·
1 Parent(s): 0b2fee5

feat: prepare project for Hugging Face Spaces deploy

Browse files

Adds the Spaces YAML frontmatter to README and flips the Dockerfile defaults to install the heavy transformer stack and cache HF assets under /tmp so the container works under the Spaces non-root user.

Files changed (2) hide show
  1. Dockerfile +3 -1
  2. README.md +12 -0
Dockerfile CHANGED
@@ -8,12 +8,14 @@ RUN npm run build
8
 
9
  FROM python:3.12-slim-bookworm
10
 
11
- ARG INSTALL_HF=0
12
 
13
  ENV PYTHONDONTWRITEBYTECODE=1 \
14
  PYTHONUNBUFFERED=1 \
15
  PYTHONPATH=/app \
16
  NLTK_DATA=/app/nltk_data \
 
 
17
  MODEL_NAME="Meta-Feature Stacking (Production)" \
18
  ENV=production \
19
  PORT=8000 \
 
8
 
9
  FROM python:3.12-slim-bookworm
10
 
11
+ ARG INSTALL_HF=1
12
 
13
  ENV PYTHONDONTWRITEBYTECODE=1 \
14
  PYTHONUNBUFFERED=1 \
15
  PYTHONPATH=/app \
16
  NLTK_DATA=/app/nltk_data \
17
+ HF_HOME=/tmp/hf_cache \
18
+ TRANSFORMERS_CACHE=/tmp/hf_cache \
19
  MODEL_NAME="Meta-Feature Stacking (Production)" \
20
  ENV=production \
21
  PORT=8000 \
README.md CHANGED
@@ -1,3 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  <div align="center">
2
 
3
  <img src="docs/assets/signalmod_logo.png" alt="SignalMod" width="520" />
 
1
+ ---
2
+ title: SignalMod
3
+ emoji: 🛡️
4
+ colorFrom: red
5
+ colorTo: yellow
6
+ sdk: docker
7
+ app_port: 8000
8
+ pinned: false
9
+ license: apache-2.0
10
+ short_description: Smart moderation for YouTube comments
11
+ ---
12
+
13
  <div align="center">
14
 
15
  <img src="docs/assets/signalmod_logo.png" alt="SignalMod" width="520" />