image-upscaler / app.py
ehristoforu's picture
Update app.py
1ea8e84
raw
history blame
563 Bytes
import gradio as gr
from rembg import remove
# Функция для удаления водяных знаков с изображения
def remove_watermark(input_image):
# Загрузка изображения и удаление фона
with open("input.png", "wb") as f:
f.write(input_image.read())
output = remove("input.png")
return output.tobytes()
# Создание Gradio приложения
iface = gr.Interface(
fn=remove_watermark,
inputs=gr.Image(),
outputs=gr.Image(),
live=True,
)
iface.launch()