-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
30 lines (22 loc) · 754 Bytes
/
app.py
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
import warnings
warnings.filterwarnings("ignore")
from model import download_model_if_not_exists
import sys
isExist = download_model_if_not_exists()
if isExist == False:
sys.exit(0)
import gradio as gr
from src import predict_colored_image
title = "Black&White to Color image"
description = "Transforming Black & White Image in to colored image. Upload a black and white image to see it colorized by our deep learning model."
gr.Interface(
fn=predict_colored_image,
title=title,
description=description,
inputs=[gr.Image(label="Gray Scale Image")],
outputs=[
gr.Image(label="Predicted Colored Image"),
gr.Text(label="SSIM Loss"),
gr.Text(label="PSNR Loss"),
],
).launch(share=True, debug=True)