A powerful Gradio application that combines intelligent coordinate analysis with AI chat capabilities for liquefaction susceptibility assessment. Link to the app.
- Intelligent Extraction: Uses regex patterns with LLM fallback for robust coordinate parsing
- Multiple Formats: Supports various input formats:
- Standard:
1511300, 5266130
- Labeled:
x: 1511300, y: 5266130
- Natural Language:
"What's the liquefaction at coordinates 1511300, 5266130?"
- Standard:
- Real-time Data: Queries Canterbury Liquefaction Susceptibility ArcGIS MapServer
- Fast Processing: Regex-first approach ensures quick responses
- Powered by Qwen: Uses Qwen/Qwen3-0.6B model for intelligent conversations
- General Knowledge: Also handles general questions and conversations
- Navigate to the "Coordinate Analysis" tab
- Enter coordinates in any supported format
- Click "Analyze Coordinates" to get results
- View liquefaction susceptibility data
- Switch to the "Chat Assistant" tab
- Type your question or message
- Click "Send Message" for AI response
- Get helpful information and guidance
- Frontend: Gradio 4.0+ with modern UI components
- AI Model: Qwen/Qwen3-0.6B (Hugging Face Transformers)
- Coordinate System: NZTM (New Zealand Transverse Mercator)
- Data Source: Canterbury Liquefaction Susceptibility ArcGIS MapServer
- Processing: Hybrid regex + LLM approach for optimal performance
1511300, 5266130
x: 1511300, y: 5266130
What's the liquefaction at coordinates 1511300, 5266130?
Can you check 1511300, 5266130 for me?
Hello, what can you help me with?
What is liquefaction susceptibility?
How do I use this application?
This application is optimized for Hugging Face Spaces deployment:
- Create Space: New Gradio Space on huggingface.co/spaces
- Upload Files:
app.py
(main application)requirements.txt
(dependencies)query.py
(coordinate query module)
- Configure:
- Hardware: CPU (recommended)
- Python: 3.9+
- Visibility: Public/Private
pip install -r requirements.txt
python app.py
- Python 3.9+
- Gradio >= 4.0.0
- Transformers >= 4.30.0
- Torch >= 2.0.0
- Requests >= 2.28.0
- Input Processing: User provides coordinates or questions
- Smart Parsing: Regex patterns extract coordinates, LLM handles complex queries
- Data Retrieval: Queries ArcGIS MapServer for geological data
- Response Generation: AI generates helpful responses and explanations
- Result Display: Clean, formatted output for easy interpretation
Feel free to contribute by:
- Reporting bugs
- Suggesting new features
- Improving documentation
- Adding new coordinate formats
This project is open source and available under the MIT License.
Built with ❤️ for the geological and engineering community