Spaces:
Sleeping
Sleeping
Vector73
commited on
Commit
·
4655d1b
1
Parent(s):
82d82cc
Merge branch 'add-audio-model' of https://github.com/kartikbhtt7/Nature-Nexus into add-audio-model
Browse files
app.py
CHANGED
@@ -6,9 +6,16 @@ import tempfile
|
|
6 |
import librosa
|
7 |
import librosa.display
|
8 |
import matplotlib.pyplot as plt
|
|
|
|
|
|
|
|
|
9 |
from PIL import Image
|
10 |
import torch
|
11 |
|
|
|
|
|
|
|
12 |
# Import deforestation modules
|
13 |
from prediction_engine import load_onnx_model
|
14 |
from utils.helpers import calculate_deforestation_metrics, create_overlay
|
@@ -31,6 +38,7 @@ st.set_page_config(
|
|
31 |
initial_sidebar_state="expanded"
|
32 |
)
|
33 |
|
|
|
34 |
# Constants
|
35 |
DEFOREST_MODEL_INPUT_SIZE = 256
|
36 |
AUDIO_MODEL_PATH = "models/best_model.pth"
|
|
|
6 |
import librosa
|
7 |
import librosa.display
|
8 |
import matplotlib.pyplot as plt
|
9 |
+
import tempfile
|
10 |
+
import librosa
|
11 |
+
import librosa.display
|
12 |
+
import matplotlib.pyplot as plt
|
13 |
from PIL import Image
|
14 |
import torch
|
15 |
|
16 |
+
# Import deforestation modules
|
17 |
+
from prediction_engine import load_onnx_model
|
18 |
+
|
19 |
# Import deforestation modules
|
20 |
from prediction_engine import load_onnx_model
|
21 |
from utils.helpers import calculate_deforestation_metrics, create_overlay
|
|
|
38 |
initial_sidebar_state="expanded"
|
39 |
)
|
40 |
|
41 |
+
|
42 |
# Constants
|
43 |
DEFOREST_MODEL_INPUT_SIZE = 256
|
44 |
AUDIO_MODEL_PATH = "models/best_model.pth"
|