Spaces:
Running
A newer version of the Gradio SDK is available:
6.4.0
title: Geoai Coding Agent
emoji: π
colorFrom: pink
colorTo: red
sdk: gradio
sdk_version: 6.3.0
app_file: app.py
pinned: false
license: agpl-3.0
tags:
- geospatial
- geospatial-ai
- AI
- ML
- DL
- LLM
- satellite-data
- earth-observation
- nlp
- maps
- data-visualization
- natural-language
- gradio
- huggingface
short_description: GeoAI Coding Agent - Geospatial AI Coding Assistant"
π GeoAI Coding Agent
A Geospatial AI Coding Assistant powered by Qwen/Qwen2.5-Coder-7B-Instruct via HuggingFace Inference API.
Specialized in GDAL/OGR, Rasterio, GeoPandas, xarray, and geospatial development across multiple programming languages.
β¨ Features
- πΊοΈ Geospatial Expertise: Deep knowledge of GDAL, Rasterio, GeoPandas, PyProj, xarray, and rioxarray
- π» Multi-Language Support: Python, Java, C/C++, JavaScript, TypeScript, Rust
- π₯ Download Options: Export responses as Markdown, Jupyter Notebooks, or code files
- π¨ Code Editor Style UI: Syntax highlighting with dark theme
- π BYOT (Bring Your Own Token): Uses your HuggingFace API token for inference
- β‘ Streaming Responses: Real-time token streaming for better UX
π Quick Start
Local Development
Clone the repository
git clone https://github.com/rifatSDAS/geoai-coding-agent.git cd geoai-coding-agentCreate virtual environment
python -m venv venv source venv/bin/activate # Linux/Mac # or venv\Scripts\activate # WindowsInstall dependencies
pip install -r requirements.txtRun the application
python app.pyOpen in browser: Navigate to
http://localhost:7860Enter your HuggingFace token: Get one at huggingface.co/settings/tokens
Run Tests
pytest test_app.py -v
π³ HuggingFace Spaces Deployment
Create a new Space at huggingface.co/new-space
- Select Gradio as the SDK
- Choose CPU basic (free tier)
Upload files
app.pyconfig.pyrequirements.txtREADME.md(optional)
That's it! The Space will automatically build and deploy.
π Project Structure
geoai-coding-agent/
βββ app.py # Main Gradio application
βββ config.py # Configuration, prompts, templates
βββ test_app.py # Unit tests
βββ requirements.txt # Python dependencies
βββ .gitignore # Git ignore rules
βββ README.md # This file
π― Example Queries
- "Read a GeoTIFF with rasterio and calculate NDVI from Sentinel-2 bands"
- "Convert shapefile to GeoJSON using GDAL/OGR in Python"
- "Reproject a raster from EPSG:4326 to EPSG:32632 using rasterio"
- "Clip a large COG raster to a polygon boundary using rioxarray"
- "Create a spatial join between two GeoDataFrames in GeoPandas"
- "Implement parallel raster processing with GDAL in C++"
βοΈ Configuration
Key settings in config.py:
| Parameter | Default | Description |
|---|---|---|
MODEL_ID |
Qwen/Qwen2.5-Coder-7B-Instruct |
HuggingFace model |
MAX_NEW_TOKENS |
2048 |
Maximum response length |
TEMPERATURE |
0.3 |
Sampling temperature (lower = more focused) |
TOP_P |
0.9 |
Nucleus sampling threshold |
π API Token
This application requires a HuggingFace API token for inference. This design:
- β Keeps the Space free (no server-side costs)
- β Prevents token limit overflow
- β Gives users control over their usage
Get your free token at: huggingface.co/settings/tokens
π οΈ Supported Languages
| Language | Extension | Use Case |
|---|---|---|
| Python | .py |
GDAL, Rasterio, GeoPandas |
| Java | .java |
GeoTools, JTS |
| C/C++ | .c, .cpp |
GDAL C API, performance |
| JavaScript | .js |
Leaflet, OpenLayers, Turf.js |
| TypeScript | .ts |
Type-safe geospatial apps |
| Rust | .rs |
GDAL Rust bindings, geo crate |
π¦ Dependencies
- gradio: Web UI framework
- huggingface-hub: HF Inference API client
- pytest: Testing framework
π Acknowledgments
- Inspired by GeoAI-Assistance-Ext VS Code Extension
- Powered by Qwen2.5-Coder
- Built with Gradio
About the Developer
Built by Dr. Kazi Rifat Ahmed, a Full Stack Geospatial AI Engineer specializing in:
- AI/ML-DL for geospatial applications
- Cloud-native geospatial software engineering & architecture
- Large-scale Satellite/Earth Observation data data analysis, processing, analytics, and visualization
- Blockchain and Quantum Computing for geospatial applications
- Research Advanced Geospatial Science, Technology, and Applications
- Co-founder and Technical Lead for Satellite Data Services business in Space sector, i.e., QuentuED (https://quentued.de) and Sensor Aktor (https://sensor-aktor.de)
Tech Stack Proficiency
Python | Java | JavaScript | TypeScript | C/C++ | Bash | Cloud-Native Architecture (kubernetes) | DevOps | AI/ML/DL | MLOps | LLM Integration | Blockchain | Remote Sensing Science & Technology | Geospatial Data Science & Engineering
Research Interests
Geospatial AI | Satellite Data Engineering | Drone Sensors | Geospatial Big Data Analytics | Earth Observation Systems & Sensors | Advanced Remote Sensing Techniques | Space Technology | Quantum Computing | Blockchain | | Satellite Data Services | Planetary Science & Exploration
π€ Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
pytest test_app.py -v - Submit a pull request
π License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
See LICENSE for details.
Contact
For collaboration opportunities in satellite data services & applications, large-scale satellite data analytics, geospatial AI, blockchain & quantum computing for geospatial applications, or advanced geospatial science, technology & applications, feel free to reach out!
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference