Spaces:
Paused
Paused
adjusted score
Browse files- ArtistCoherencyModel.py +6 -3
ArtistCoherencyModel.py
CHANGED
@@ -72,11 +72,14 @@ class ArtistCoherencyModel(nn.Module, PyTorchModelHubMixin):
|
|
72 |
logits = self.generate_artist_coherency_logits(song_or_embedding)
|
73 |
coherent_score = logits[coherent_index]
|
74 |
incoherent_score = logits[incoherent_index]
|
75 |
-
score = (
|
76 |
-
|
|
|
|
|
|
|
77 |
)
|
78 |
print(f"coherent_score: {float(coherent_score)}")
|
79 |
-
print(f"
|
80 |
return float(score)
|
81 |
|
82 |
def predict(
|
|
|
72 |
logits = self.generate_artist_coherency_logits(song_or_embedding)
|
73 |
coherent_score = logits[coherent_index]
|
74 |
incoherent_score = logits[incoherent_index]
|
75 |
+
score = (
|
76 |
+
100
|
77 |
+
* coherent_score
|
78 |
+
* (coherent_score - incoherent_score)
|
79 |
+
/ (coherent_score + incoherent_score)
|
80 |
)
|
81 |
print(f"coherent_score: {float(coherent_score)}")
|
82 |
+
print(f"incoherent_score: {float(incoherent_score)}")
|
83 |
return float(score)
|
84 |
|
85 |
def predict(
|