DivYonko commited on
Commit Β·
c9f1020
1
Parent(s): d85beaa
fix: enable logging output + suppress torchvision watcher noise
Browse files- Dockerfile +3 -0
- app.py +5 -0
Dockerfile
CHANGED
|
@@ -13,6 +13,9 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 13 |
|
| 14 |
COPY . .
|
| 15 |
|
|
|
|
|
|
|
|
|
|
| 16 |
EXPOSE 7860
|
| 17 |
|
| 18 |
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
|
|
|
|
| 13 |
|
| 14 |
COPY . .
|
| 15 |
|
| 16 |
+
# Suppress Streamlit's file watcher scanning transformers (harmless but noisy)
|
| 17 |
+
ENV STREAMLIT_SERVER_FILE_WATCHER_TYPE=none
|
| 18 |
+
|
| 19 |
EXPOSE 7860
|
| 20 |
|
| 21 |
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
|
app.py
CHANGED
|
@@ -80,6 +80,11 @@ from ml.sentiment_model import predict_sentiment
|
|
| 80 |
from ml.topic_model import predict_topic, VALID_TOPICS
|
| 81 |
|
| 82 |
# ββ Scraper thread logic (mirrors backend/scraper.py run()) ββββββββββββββββββ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
logger = logging.getLogger("app.scraper")
|
| 84 |
|
| 85 |
|
|
|
|
| 80 |
from ml.topic_model import predict_topic, VALID_TOPICS
|
| 81 |
|
| 82 |
# ββ Scraper thread logic (mirrors backend/scraper.py run()) ββββββββββββββββββ
|
| 83 |
+
logging.basicConfig(
|
| 84 |
+
level=logging.INFO,
|
| 85 |
+
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
|
| 86 |
+
force=True,
|
| 87 |
+
)
|
| 88 |
logger = logging.getLogger("app.scraper")
|
| 89 |
|
| 90 |
|