Matthew Wiesner commited on
Commit
43503ef
·
1 Parent(s): 34c1387

Adding distribution visualization (small fix)

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -161,8 +161,8 @@ def predict(audio_path):
161
 
162
  # pass through model
163
  x_, _ = model.forward(audio_data, audio_lens)
164
- print(x)
165
- print(x.size())
166
  x = x_.mean(dim=0).unsqueeze(0)
167
  print(x)
168
 
@@ -180,13 +180,13 @@ def predict(audio_path):
180
 
181
 
182
  coords = [[-lon, math.degrees(math.asin(math.sin(math.radians(lat))))] if lat > 90 else [lon, lat] for lat, lon in coords][0] # wraparound fix (lat > 90)
183
- coords_ = [[-lon, math.degrees(math.asin(math.sin(math.radians(lat))))] if lat > 90 else [lon, lat] for lat, lon in coords_][0] # wraparound fix (lat > 90)
184
 
185
  # create plot
186
  guesses = gv.Points([coords]).opts(
187
  size=12, cmap='Spectral_r', color='red', fill_alpha=1
188
  )
189
- guesses_ = gv.Points([coords_]).opts(
190
  size=6, cmap='Spectral_r', color='blue', fill_alpha=1
191
  )
192
 
 
161
 
162
  # pass through model
163
  x_, _ = model.forward(audio_data, audio_lens)
164
+ print(x_)
165
+ print(x_.size())
166
  x = x_.mean(dim=0).unsqueeze(0)
167
  print(x)
168
 
 
180
 
181
 
182
  coords = [[-lon, math.degrees(math.asin(math.sin(math.radians(lat))))] if lat > 90 else [lon, lat] for lat, lon in coords][0] # wraparound fix (lat > 90)
183
+ coords_ = [[-lon, math.degrees(math.asin(math.sin(math.radians(lat))))] if lat > 90 else [lon, lat] for lat, lon in coords_] # wraparound fix (lat > 90)
184
 
185
  # create plot
186
  guesses = gv.Points([coords]).opts(
187
  size=12, cmap='Spectral_r', color='red', fill_alpha=1
188
  )
189
+ guesses_ = gv.Points(coords_).opts(
190
  size=6, cmap='Spectral_r', color='blue', fill_alpha=1
191
  )
192