Spaces:
Running
Running
| 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 <a href='https://github.com/leonelhs/zeroscratches/' target='_blank'>Github ⭐</a> | |
| <a href="https://www.buymeacoffee.com/leonelhs"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=leonelhs&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff" /></a> | |
| <center><img src='https://visitor-badge.glitch.me/badge?page_id=zeroscratches.visitor-badge' alt='visitor badge'></center> | |
| """ | |
| 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() | |