-1

I am working in a simple flask project in colab. The whole program runs, and the run method produces a localhost URL. But I am not able to view the HTML site. It runs locally on my computer, but not in colab.

The error is displayed below: ERROR IMAGE

I have changed my flask run method's host to 0.0.0.0 based on the following StackOverflow answer. My previous question.

The whole code is available at Code link.

E_net4
  • 27,810
  • 13
  • 101
  • 139
G.MAHESH
  • 120
  • 11

1 Answers1

1

Run this code.

from google.colab.output import eval_js
eval_js("google.colab.kernel.proxyPort(5000)")

And use the printed URL instead of 127.0.0.1

korakot
  • 37,818
  • 16
  • 123
  • 144