File size: 2,468 Bytes
089a35b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14219c3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7680d0d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99

# Earthquake AI Detection System (MVP)

## Project Structure

- `android_app/`: Android (Kotlin) app with sensor detection, AI inference, GPS, and WebView.
- `backend_fastapi/`: Python FastAPI server to receive and serve tremor events.
- `web_dashboard/`: Streamlit web app for visualization (Hugging Face Spaces compatible).
- `models/`: Contains `yamnet.tflite` and placeholder tremor detection model.

## Instructions

1. **Android App**
   - Open `android_app/` in Android Studio.
   - Replace backend URL in API call.
   - Build and install on Android device.

2. **Backend**
   - Navigate to `backend_fastapi/`
   - Install dependencies: `pip install fastapi uvicorn`
   - Run with: `uvicorn main:app --reload`

3. **Web Dashboard**
   - Navigate to `web_dashboard/`
   - Install dependencies: `pip install streamlit`
   - Run with: `streamlit run dashboard.py`

Upload everything to your GitHub repo once unzipped.

*** Test data
in command line - curl -X POST https://overflowing-intuition-production.up.railway.app/upload \
  -H "Content-Type: application/json" \
  -d '[
    {
      "lat": 31.2304,
      "lon": 121.4737,
      "label": "mainshock",
      "timestamp": "2025-07-07T08:45:00"
    },
    {
      "lat": 35.6762,
      "lon": 139.6503,
      "label": "aftershock",
      "timestamp": "2025-07-07T09:20:00"
    },
    {
      "lat": 1.3521,
      "lon": 103.8198,
      "label": "seismic_event",
      "timestamp": "2025-07-07T10:05:00"
    },
    {
      "lat": 21.0278,
      "lon": 105.8342,
      "label": "foreshock",
      "timestamp": "2025-07-07T11:30:00"
    }
  ]' 
--
curl -X POST https://overflowing-intuition-production.up.railway.app/upload \
  -H "Content-Type: application/json" \
  -d '[
    {
      "lat": -4.769,
      "lon": 11.866,
      "label": "mainshock",
      "timestamp": "2025-07-07T08:00:00"
    },
    {
      "lat": -5.816,
      "lon": 13.450,
      "label": "aftershock",
      "timestamp": "2025-07-07T08:45:00"
    },
    {
      "lat": 0.392,
      "lon": 9.454,
      "label": "seismic_event",
      "timestamp": "2025-07-07T09:30:00"
    },
    {
      "lat": 3.752,
      "lon": 8.774,
      "label": "foreshock",
      "timestamp": "2025-07-07T10:15:00"
    },
    {
      "lat": -8.838,
      "lon": 13.234,
      "label": "tremor",
      "timestamp": "2025-07-07T11:00:00"
    },
    {
      "lat": 4.067,
      "lon": 9.700,
      "label": "impact",
      "timestamp": "2025-07-07T11:45:00"
    }
  ]'