import gradio as gr import spaces from core import IQA metric = IQA("nima-vgg16-ava") def greet(image): return metric(image).item() demo = gr.Interface(fn=greet, inputs=gr.Image(format="png", image_mode="RGB", type="pil"), outputs=gr.Textbox()) demo.launch()