File size: 414 Bytes
4bb11f7
 
577e64d
 
4bb11f7
 
577e64d
4bb11f7
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr

from predict_genre import image_analyzer


def picture_analysis(input_image) -> str:
    return image_analyzer.predict_genre(input_image)


demo = gr.Interface(
    fn=picture_analysis,
    inputs=gr.Image(type="filepath"),
    outputs="textbox",
    title="Painting Genre Analysis",
    description="Upload an image to get the genre prediction"
)

if __name__ == "__main__":
    demo.launch()