Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -41,6 +41,13 @@ def visualize_one_hot_encoded_sequence(tensor, sentence, col_labels, cmap='BuGn'
|
|
41 |
ax.set_xlabel('Phones')
|
42 |
ax.set_ylabel('Features')
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
# Display the heatmap
|
45 |
ax.set_title(f"»{sentence}«")
|
46 |
return fig
|
|
|
41 |
ax.set_xlabel('Phones')
|
42 |
ax.set_ylabel('Features')
|
43 |
|
44 |
+
ax.set_xticks(np.arange(-0.5, tensor.shape[1], 1), minor=True)
|
45 |
+
ax.set_yticks(np.arange(-0.5, tensor.shape[0], 1), minor=True)
|
46 |
+
|
47 |
+
# Turn on the grid for minor ticks (i.e., between the cells)
|
48 |
+
ax.grid(which='minor', color='darkgrey', linestyle='-', linewidth=2)
|
49 |
+
ax.tick_params(which='minor', size=0) # Hide minor tick marks
|
50 |
+
|
51 |
# Display the heatmap
|
52 |
ax.set_title(f"»{sentence}«")
|
53 |
return fig
|