%%writefile app.py is not working on vscode. how do i make an app.py file?
Question:
My mentor using google colab made an app.py file using %%writefile app.py called it a ‘magic’ command. However, when I tried implementing the same on my vscode file, it didn’t work. My mentor used google colab while I use vscode. How do I execute a similar app.py in my vscode environment?
(The main ML model is in a different joblib dump, thus it cannot be recreated in an independent system. The image provided aptly represents the problem being encountered. Considering these reasons, code for the same has not been provided here.)
Answers:
As is shown in your teacher’s picture, this is .ipynb
file which can be run after install "jupyter" extension on vscode. %%writefile app.py
is the syntax in jupyter notebook. You can use it to creat files.
So, install the extension and follow your teacher’s example. Vscode can do this.
My mentor using google colab made an app.py file using %%writefile app.py called it a ‘magic’ command. However, when I tried implementing the same on my vscode file, it didn’t work. My mentor used google colab while I use vscode. How do I execute a similar app.py in my vscode environment?
(The main ML model is in a different joblib dump, thus it cannot be recreated in an independent system. The image provided aptly represents the problem being encountered. Considering these reasons, code for the same has not been provided here.)
As is shown in your teacher’s picture, this is .ipynb
file which can be run after install "jupyter" extension on vscode. %%writefile app.py
is the syntax in jupyter notebook. You can use it to creat files.
So, install the extension and follow your teacher’s example. Vscode can do this.