gradio

장난감 프로젝트

[Gradio]그라디오를 이용한 간단한 이미지 필터 웹

0. 목적 이미지 생성을 위한 그라디오 웹 생성 1.코드 import numpy as np import gradio as gr # 이미지 생성 하는 함수 아직 API가 구현이 되지 않았으므로 세피아 필터로 구현 def predict_image(img , select_model , gender): sepia_filter = np.array([ [0.393, 0.769, 0.189], [0.349, 0.686, 0.168], [0.272, 0.534, 0.131] ]) sepia_img = img.dot(sepia_filter.T) sepia_img /= sepia_img.max() print(gender,select_model) print(img) return sepia_img # gradio blocks..

easysheep
'gradio' 태그의 글 목록