
AI-enabled detection of exoplanets from noisy TESS light curves, using a Box-Least-Squares transit search feeding a calibrated XGBoost + Random-Forest ensemble, plus an LLM (via Groq) that explains and discusses each result with you.
A Streamlit front-end for the Exo-Planet-AkashSetu v4 pipeline (Bharatiya Antariksh Hackathon 2026, Challenge 7): AI-enabled detection of exoplanets from noisy TESS light curves, using a Box-Least-Squares transit search feeding a calibrated XGBoost + Random-Forest ensemble, plus an LLM (via Groq) that explains and discusses each result with you.
exoplanet_app/
├── app.py # Streamlit UI
├── pipeline.py # Ported signal-processing / feature-extraction / scoring logic
├── llm.py # Groq (OpenAI-compatible) reasoning + Q&A helper
├── model/
│ ├── tess_exoplanet_model_v4.joblib # Pretrained ensemble (60 features)
│ └── labels_reference.csv # Reference TIC labels from the original dataset
├── requirements.txt
└── README.md
The model was trained in the original notebook on ~2,000 labeled TESS light curves. This app reuses that trained model directly — it does not retrain anything, it only runs inference (feature extraction → impute → predict → classify) on light curves you provide.
bashcd exoplanet_app python3 -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt
Note on scikit-learn version: the model was pickled with scikit-learn 1.6.1.
requirements.txtpins that exact version so the savedIterativeImputer/RandomForestClassifier/IsotonicRegressionobjects unpickle correctly. If you seeAttributeErroron load, double checkpip show scikit-learnreports1.6.1.
bashstreamlit run app.py
This opens the app at http://localhost:8501.
tess*_lc.fits), auto-detects TIME/BTJD and
PDCSAP_FLUX/SAP_FLUX columns, and filters bad-quality cadences.time, btjd, bjd, ...) and flux column
(pdcsap_flux, sap_flux, flux, ...).lightkurve
(lk.search_lightcurve("TIC <id>", mission="TESS").download()).Once a light curve is loaded, the app automatically:
Visualizations (all interactive, Plotly):
You can download the full numeric result as JSON.
Enter your Groq API key in the sidebar (a default key is pre-filled — swap in your own for production use). Click "Explain this result" for a plain-English write-up of what the model decided and why, then use the chat box underneath to ask follow-up questions, e.g.:
The LLM is instructed to reason strictly from the numeric result already computed by the pipeline (score, BLS power/SNR, depth, shape metrics) — it does not re-analyze the raw light curve itself, just interprets the pipeline's own output.
Instead of pasting the key into the sidebar each time, you can:
app.py
(os.environ.get("GROQ_API_KEY")), or.streamlit/secrets.toml:tomlGROQ_API_KEY = "gsk_..."
and change the sidebar default to st.secrets.get("GROQ_API_KEY", "").
AttributeError when loading the model — mismatched scikit-learn
version. Reinstall with pip install "scikit-learn==1.6.1".

