Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,50 +1,52 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
| 50 |
python app.py
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: NewsIntel Agent
|
| 3 |
+
emoji: π»
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: gradio
|
| 7 |
+
app_file: app.py
|
| 8 |
+
python_version: 3.11
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
ποΈ NewsIntel Agent β Job Briefings & Hiring Signals
|
| 13 |
+
A Gradio app that pulls recent news, generates grounded summaries, detects entities & sentiment, and produces interview-ready briefings (HTML/PDF).
|
| 14 |
+
Includes one-click modes (Healthcare / Finance / R&D), caching, charts, and optional S3/SES export + weekly email.
|
| 15 |
+
|
| 16 |
+
β¨ Features
|
| 17 |
+
Google/press-release RSS + your custom get_news source
|
| 18 |
+
LLM-generated grounded summaries (via your services.llm.summarize)
|
| 19 |
+
Entity extraction, keywording, sentiment
|
| 20 |
+
Trend & simple 7-day forecast (linear fit on daily sentiment)
|
| 21 |
+
Briefing export: HTML (built-in) and PDF (optional, via reportlab)
|
| 22 |
+
Optional S3 upload + SES weekly email
|
| 23 |
+
π Repository layout (minimum)
|
| 24 |
+
ββ app.py # (rename your gradio_app -> app.py) ββ requirements.txt ββ README.md ββ services/ β ββ init.py β ββ search.py # must define get_news(query, days, k) -> list[dict] β ββ llm.py # must define summarize(prompt) -> str β ββ huggingface_nlp.py # must define analyze_sentiment, analyze_entities, extract_keywords β ββ aws.py # optional: s3_upload(path), ses_send_email(to, subj, html) β ββ cache.py # get_cache(*keys), set_cache(obj, *keys)
|
| 25 |
+
|
| 26 |
+
Do NOT upload your local .env. Use Spaces β Settings β Variables & secrets instead.
|
| 27 |
+
|
| 28 |
+
π§ Environment variables (set in Spaces β Settings β Variables & secrets)
|
| 29 |
+
Only set what you actually use in your services/ modules.
|
| 30 |
+
|
| 31 |
+
If your services/llm.py calls OpenAI (example):
|
| 32 |
+
|
| 33 |
+
OPENAI_API_KEY
|
| 34 |
+
If your services/llm.py calls Hugging Face Inference API (example):
|
| 35 |
+
|
| 36 |
+
HF_TOKEN
|
| 37 |
+
If enabling S3 uploads in services/aws.py:
|
| 38 |
+
|
| 39 |
+
AWS_ACCESS_KEY_ID
|
| 40 |
+
AWS_SECRET_ACCESS_KEY
|
| 41 |
+
AWS_DEFAULT_REGION (e.g., us-east-1)
|
| 42 |
+
S3_BUCKET (bucket name)
|
| 43 |
+
If enabling SES emails in services/aws.py:
|
| 44 |
+
|
| 45 |
+
SES_SENDER_EMAIL (verified in SES)
|
| 46 |
+
(same AWS creds/region as above)
|
| 47 |
+
If these arenβt set, the app will still run; S3/SES buttons will simply show fallback messages.
|
| 48 |
+
|
| 49 |
+
βΆοΈ Run locally
|
| 50 |
+
python -m venv .venv && source .venv/bin/activate # on Windows: .venv\Scripts\activate
|
| 51 |
+
pip install -r requirements.txt
|
| 52 |
python app.py
|