anishathalye / neural-style

Neural style in TensorFlow! 🎨
https://anishathalye.com/an-ai-that-can-mimic-any-artist/
GNU General Public License v3.0
5.54k stars 1.51k forks source link

how do you run this? #179

Closed eformx closed 2 years ago

eformx commented 2 years ago

neural_style.py --content 'examples/1-content.jpg' --styles 'examples/1-style.jpg' --output 'out.jpg'

I run this in PyCharm and it says wrong format? what is the correct format/synax for the images?

anishathalye commented 2 years ago

Can you give more details on how you're running it, and what is the error message?

You should be able to run it from the command-line, with python neural_style.py ...

eformx commented 2 years ago

Invalid syntax. I just need how to enclose images in the call. I tried single quotes like the original call in the console, but I am getting a syntax error? See screenshot...

eformx commented 2 years ago

image

anishathalye commented 2 years ago

The >>> indicates that you're typing into a Python REPL. That's a bash command, you need to type it into a command shell.

eformx commented 2 years ago

tried a command prompt, same typo error. this worked for anyone else trying to run this. I am using PyCharm. Select Run>Edit Configurations and then create a new one for Python. Then select the py script to run. Then you enter the flags plus the file names in double quotes like this...

-content C:\Sites\flaskProject\tmp\nst\g1.jpg --styles C:\Sites\flaskProject\tmp\nst\starry_night.jpg --output C:\Temp\output.jpg

image