import os import gradio as gr from zeroscratches import EraseScratches os.system("pip freeze") def predict(img): return EraseScratches().erase(img) title = "Zero Scratches" description = r""" ## Old Photo Restoration This is a lightweight implementation of [Microsoft Bringing Old Photos Back to Life](https://github.com/microsoft/Bringing-Old-Photos-Back-to-Life) """ article = r""" Questions, doubts, comments, please email 📧 `leonelhs@gmail.com` This demo is running on a CPU, if you like this project please make us a donation to run on a GPU or just give us a Github ⭐
visitor badge
""" demo = gr.Interface( predict, [ gr.Image(type="pil", label="Input"), ], [ gr.Image(type="numpy", label="Image zero scratches") ], title=title, description=description, article=article) demo.queue().launch()