<jupyter_start><jupyter_text>**Initializing the NST Model**<jupyter_code>from nst import NST
nst_res = NST(gpu=True)<jupyter_output>Downloading: "https://download.pytorch.org/models/vgg19-dcbb9e9d.pth" to /root/.cache/torch/hub/checkpoints/vgg19-dcbb9e9d.pth<jupyter_text>**Setting image paths and running inferences**<jupyter_code>content_img, style_img = ('content.jpg', 'style.jpg')
result = nst_res.run_nst(content_img, style_img)<jupyter_output>Optimizing
Step 50:
Style Loss: 54.366673 Content Loss: 35.102470
Step 100:
Style Loss: 12.332299 Content Loss: 25.728865
Step 150:
Style Loss: 6.020488 Content Loss: 19.590349
Step 200:
Style Loss: 3.522784 Content Loss: 16.024742
Step 250:
Style Loss: 2.316895 Content Loss: 13.732924
Step 300:
Style Loss: 1.676409 Content Loss: 12.380816<jupyter_text>**Visualizing**<jupyter_code>import matplotlib.pyplot as plt

plt.imshow(result)
plt.show()
content_img, style_img = ('content2.jpeg', 'style2.jpg')
result = nst_res.run_nst(content_img, style_img)
plt.imshow(result)
plt.show()
content_img, style_img = ('content3.jpg', 'style3.jpg')
result = nst_res.run_nst(content_img, style_img)
plt.imshow(result)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13032581453634084, 'fraction_numerical': 0.1010860484544695, 'mean_word_length': 7.149659863945578, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '341700', 'license': 'MIT', 'n_tokens_mistral': 562, 'n_tokens_neox': 475, 'n_words': 94, 'path': 'demo/demo_nb.ipynb', 'repo_name': 'indiradutta/ArtiStyle', 'size': '1197'}