File size: 1,308 Bytes
9aa2121
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import os

import gradio as gr
from zeroscratches import EraseScratches

os.system("pip freeze")


def inference(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"""
If you have any question, please email 📧 `[email protected]`.

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=hg.leonelhs.zeroscratches.visitor-badge' alt='visitor badge'></center>
"""
demo = gr.Interface(
    inference, [
        gr.Image(type="pil", label="Input"),
    ], [
        gr.Image(type="numpy", label="Image zero scratches")
    ],
    title=title,
    description=description,
    article=article)

demo.queue().launch()