I am trying to convert Gradio app to flask api.
In Gradio app, it is using components like Image, Text, and so on.
I have to change that component to request form data.
However, I am suffering with image processing.
I need any help.
This is my code.
cloth_image = gr.Image(label="Your label...", type="pil") cloth_mask_image = gr.Image(label="Your label...", type="pil")
How can I get the same return value as gr.Image component by preprocessing of cloth_image = request.files['cloth_image']