Another program is using this file and the process cannot access the error (ERROR: Exception in ASGI application) when using gradient to upload images.

I encountered a problem when deploying gradient today
When running the code copied from the official documentation of gradient, an error occurred

import gradio as gr

def image_classifier(inp):
    return {
    
    'cat': 0.3, 'dog': 0.7}

demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label")
demo.launch()

Error message
I searched a lot of results without success, it seems to be an incompatibility problem with the window system
Take the method of downgrading gradio

pip install gradio==3.50.2

Guess you like

Origin blog.csdn.net/Silver__Wolf/article/details/134198736