| import gradio as gr | |
| from libs import * | |
| with gr.Blocks(title="수업 성적 확인") as demo: | |
| gr.Markdown("수업 성적 확인을 위해, 수업과 이름 학번을 입력하세요.") | |
| with gr.Row(): | |
| with gr.Column(): | |
| input_image = gr.Image(type='numpy',label="이미지 입력", image_mode='RGB') | |
| with gr.Column(): | |
| guild_image = gr.Image(os.path.join("Image", "0.jpg"),type='numpy', label="정답 이미지", interactive=False) | |
| with gr.Row(): | |
| image_button = gr.Button("이미지 유사도 평가") | |
| with gr.Row(): | |
| data_output = gr.Text(label="유사도", interactive=False) | |
| image_button.click(check_img,inputs=[input_image, guild_image], outputs = [data_output]) | |
| demo.launch() |