Spaces:
Sleeping
A newer version of the Gradio SDK is available:
6.6.0
title: NewsIntel Agent
emoji: π»
colorFrom: indigo
colorTo: purple
sdk: gradio
app_file: app.py
python_version: 3.11
pinned: false
sdk_version: 5.42.0
ποΈ NewsIntel Agent β Job Briefings & Hiring Signals A Gradio app that pulls recent news, generates grounded summaries, detects entities & sentiment, and produces interview-ready briefings (HTML/PDF). Includes one-click modes (Healthcare / Finance / R&D), caching, charts, and optional S3/SES export + weekly email.
β¨ Features Google/press-release RSS + your custom get_news source LLM-generated grounded summaries (via your services.llm.summarize) Entity extraction, keywording, sentiment Trend & simple 7-day forecast (linear fit on daily sentiment) Briefing export: HTML (built-in) and PDF (optional, via reportlab) Optional S3 upload + SES weekly email π Repository layout (minimum) ββ 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)
Do NOT upload your local .env. Use Spaces β Settings β Variables & secrets instead.
π§ Environment variables (set in Spaces β Settings β Variables & secrets) Only set what you actually use in your services/ modules.
If your services/llm.py calls OpenAI (example):
OPENAI_API_KEY If your services/llm.py calls Hugging Face Inference API (example):
HF_TOKEN If enabling S3 uploads in services/aws.py:
AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION (e.g., us-east-1) S3_BUCKET (bucket name) If enabling SES emails in services/aws.py:
SES_SENDER_EMAIL (verified in SES) (same AWS creds/region as above) If these arenβt set, the app will still run; S3/SES buttons will simply show fallback messages.
βΆοΈ Run locally python -m venv .venv && source .venv/bin/activate # on Windows: .venv\Scripts\activate pip install -r requirements.txt python app.py