Skip to content

Commit

Permalink
Update visual.py
Browse files Browse the repository at this point in the history
simplify my code according to author's sugg
  • Loading branch information
Taylor-Swift1 committed Dec 13, 2021
1 parent ff9d48d commit b0e5da5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions visual.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ def show_tfidf(tfidf, vocab, filename):
plt.tight_layout()
# creating the output folder
output_folder = './visual/results/'
if not os.path.exists(output_folder):
os.makedirs(output_folder)
os.makedirs(output_folder, exist_ok=True)
plt.savefig(os.path.join(output_folder, '%s.png') % filename, format="png", dpi=500)
plt.show()

Expand Down

0 comments on commit b0e5da5

Please sign in to comment.