Spaces:
Running
Running
HiruniUdarika
commited on
Commit
·
0593077
1
Parent(s):
13ad344
GUI Updated
Browse files- .gitattributes +1 -0
- .gitignore +2 -0
- app.py +7 -1
- static/audio/Elephant Growl Low.wav +0 -0
- templates/index.html +15 -14
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
*.wav filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
venv
|
2 |
+
__pycache__
|
app.py
CHANGED
@@ -53,7 +53,13 @@ def identify():
|
|
53 |
model = load_model_based_on_condition(condition).to(device)
|
54 |
|
55 |
predicted_class, probabilities = inference_audio_file(model, audio_file, classes)
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
spectrogram_image = generate_spectrogram(audio_file)
|
59 |
|
|
|
53 |
model = load_model_based_on_condition(condition).to(device)
|
54 |
|
55 |
predicted_class, probabilities = inference_audio_file(model, audio_file, classes)
|
56 |
+
if predicted_class== 'Rumble':
|
57 |
+
caller_type_description = 'Elephant communication often relies on low-frequency vibrations called "rumbles," produced through vocal cord vibration and altered by resonance within an elephant\'s head or trunk structure. Rumbles play multiple functions such as maintaining social cohesion among group movements as well as conveying emotions like excitement distress or arousal.'
|
58 |
+
if predicted_class== 'Roar':
|
59 |
+
caller_type_description = 'Elephant roars are low-frequency vocalizations made during intense social interactions such as mating rituals or hostile encounters that serve to intimidate rivals, establish dominance, or attract potential mates. Roars may accompany visual displays such as posturing, head shaking, and/or ear flapping that strengthen their communicative capability within elephant society.'
|
60 |
+
if predicted_class== 'Trumpet':
|
61 |
+
caller_type_description = 'Elephant trumpets are powerful trumpet-like calls produced by forcing air through an elephant\'s trunk to produce loud, resonant noises that resonate loudly and frequently. Elephants use trumpets for various reasons such as alarm calls to warn potential threats or show dominance during social interactions and long-distance communication; their distinct nature adds much excitement for researchers and wildlife enthusiasts.'
|
62 |
+
|
63 |
|
64 |
spectrogram_image = generate_spectrogram(audio_file)
|
65 |
|
static/audio/Elephant Growl Low.wav
DELETED
Binary file (728 kB)
|
|
templates/index.html
CHANGED
@@ -159,13 +159,14 @@
|
|
159 |
<div>
|
160 |
<h5 class="mb-2">Rumble</h5>
|
161 |
|
162 |
-
<p class="mb-0">
|
163 |
-
|
164 |
-
|
|
|
165 |
</div>
|
166 |
</div>
|
167 |
<audio controls class="mt-3">
|
168 |
-
<source src="static
|
169 |
Your browser does not support the audio element.
|
170 |
</audio>
|
171 |
<a href="#" class="btn uploadAudio custom-btn mt-3 mt-lg-4">Upload Sound</a>
|
@@ -177,15 +178,17 @@
|
|
177 |
|
178 |
<div class="d-flex">
|
179 |
<div>
|
180 |
-
<h5 class="mb-2">
|
181 |
|
182 |
-
<p class="mb-0">
|
183 |
-
|
184 |
-
|
|
|
|
|
185 |
</div>
|
186 |
</div>
|
187 |
<audio controls class="mt-3">
|
188 |
-
<source src="static
|
189 |
Your browser does not support the audio element.
|
190 |
</audio>
|
191 |
<a href="#" class="btn uploadAudio custom-btn mt-3 mt-lg-4">Upload Sound</a>
|
@@ -196,15 +199,13 @@
|
|
196 |
|
197 |
<div class="d-flex">
|
198 |
<div>
|
199 |
-
<h5 class="mb-2">
|
200 |
|
201 |
-
<p class="mb-0">
|
202 |
-
elit. Sed euismod, nunc vel tincidunt ultricies, nunc nisl
|
203 |
-
tincidunt nisl, nec tincidunt nisl nisl nec tincidunt nisl. </p>
|
204 |
</div>
|
205 |
</div>
|
206 |
<audio controls class="mt-3">
|
207 |
-
<source src="static
|
208 |
Your browser does not support the audio element.
|
209 |
</audio>
|
210 |
<a href="#" class="btn uploadAudio custom-btn mt-3 mt-lg-4">Upload Sound</a>
|
|
|
159 |
<div>
|
160 |
<h5 class="mb-2">Rumble</h5>
|
161 |
|
162 |
+
<p class="mb-0">The most common call is a deep, pulsating rumble, so low-pitched that human observers
|
163 |
+
sometimes feel it more than hear it. Elephants use soft rumbling sounds to alert the extended family to Maasai warriors.
|
164 |
+
|
165 |
+
</p>
|
166 |
</div>
|
167 |
</div>
|
168 |
<audio controls class="mt-3">
|
169 |
+
<source src="static\audio\Rumble.wav" type="audio/wav">
|
170 |
Your browser does not support the audio element.
|
171 |
</audio>
|
172 |
<a href="#" class="btn uploadAudio custom-btn mt-3 mt-lg-4">Upload Sound</a>
|
|
|
178 |
|
179 |
<div class="d-flex">
|
180 |
<div>
|
181 |
+
<h5 class="mb-2">Roar</h5>
|
182 |
|
183 |
+
<p class="mb-0">Elephants also roar—powerful, bellowing sounds that carry across the landscape.
|
184 |
+
A highly variable roaring, bellowing, screaming, shrieking, or squealing call typically lasting 1-2 seconds in duration.
|
185 |
+
The quality of the Roar depends upon the age of the individual and the behavioral context.
|
186 |
+
Roars come in three main types: noisy roars, tonal roars, and mixed roars.
|
187 |
+
</p>
|
188 |
</div>
|
189 |
</div>
|
190 |
<audio controls class="mt-3">
|
191 |
+
<source src="static\audio\Roar.wav" type="audio/wav">
|
192 |
Your browser does not support the audio element.
|
193 |
</audio>
|
194 |
<a href="#" class="btn uploadAudio custom-btn mt-3 mt-lg-4">Upload Sound</a>
|
|
|
199 |
|
200 |
<div class="d-flex">
|
201 |
<div>
|
202 |
+
<h5 class="mb-2">Trumpet</h5>
|
203 |
|
204 |
+
<p class="mb-0">Trumpets occurring within the context of intense social interactions such as a Greeting-Ceremony, Mating-Pandemonium, Birth, or other Bonding-Ceremony. </p>
|
|
|
|
|
205 |
</div>
|
206 |
</div>
|
207 |
<audio controls class="mt-3">
|
208 |
+
<source src="static\audio\Trumpet.wav" type="audio/wav">
|
209 |
Your browser does not support the audio element.
|
210 |
</audio>
|
211 |
<a href="#" class="btn uploadAudio custom-btn mt-3 mt-lg-4">Upload Sound</a>
|