Update app.py
Browse files55 unmodified lines565758596059606162632 unmodified lines666768696970717255 unmodified lines normalized_logits_array = F.softmax(torch.tensor(all_logits_array), dim=-1).numpy() transposed_logits_array = normalized_logits_array.T
# Plotting the heatmap x_tick_positions = np.arange(start_index, end_index) # Plotting the heatmap x_tick_positions = np.arange(start_index, end_index, 10) x_tick_labels = [str(pos + 1) for pos in x_tick_positions] plt.figure(figsize=(15, 8))2 unmodified lines plt.ylabel('Token') plt.xlabel('Residue Index') plt.yticks(rotation=0) plt.xticks(x_tick_positions, x_tick_labels, rotation = 0) plt.xticks(x_tick_positions - start_index, x_tick_labels, rotation=0) # Save the figure to a BytesIO object buf = BytesIO()app.py+3-3