How to Solve Gradio Interface not visible on Windows 10

Gradio is a fast way to build interfaces for machine learning apps. In Windows10 Gradio interfaces are not visible as shown below.

Gradio interface blank in Windows 10

To fix this problem,first find the python installation folder. Type the following command in the command prompt:

where python

In my case it is “D:\ananconda\envs\gradtest\“. Open the routes.py file in any text editor. Full path for the routes.py file is :

“D:\ananconda\envs\gradtest\Lib\site-packages\gradio\routes.py”

Copy the following code and paste it on top of the routes.py file.

import mimetypes

mimetypes.init()
mimetypes.add_type('application/javascript', '.js')

After editing the routes.py file it will look like this:

Routes file after editing

Save routes.py and start the Gradio app, now we can see the Gradio app interface.