Heisenberg08 commited on
Commit
ca17fe1
1 Parent(s): 035d31c

minor changes

Browse files
Files changed (1) hide show
  1. app.py +14 -6
app.py CHANGED
@@ -7,7 +7,7 @@ import torch.nn as nn
7
  import cv2
8
  import numpy as np
9
  import torch
10
- import torch.nn as nn
11
  import torchvision.transforms.functional as TF
12
  from torchvision import transforms
13
 
@@ -49,9 +49,16 @@ def blurr_image(input_image,preds):
49
  return inp,blurred_img
50
 
51
  import streamlit as st
52
- st.title("Image Colorizer")
53
-
54
- file=st.file_uploader("Please upload the B/W image",type=["jpg","jpeg","png"])
 
 
 
 
 
 
 
55
  print(file)
56
  if file is None:
57
  st.text("Please Upload an image")
@@ -62,7 +69,8 @@ else:
62
  inp_img,blurred=blurr_image(opencv_image,pred)
63
  st.text("Original")
64
  st.image(inp_img)
65
- st.text("Mask!!")
66
- st.image(pred)
 
67
  st.text("Blurred")
68
  st.image(blurred)
 
7
  import cv2
8
  import numpy as np
9
  import torch
10
+ import torch.nn as nnst
11
  import torchvision.transforms.functional as TF
12
  from torchvision import transforms
13
 
 
49
  return inp,blurred_img
50
 
51
  import streamlit as st
52
+ st.title("AI Portrait Mode")
53
+ st.markdown("Creator: [Pranav Kushare] (https://github.com/Pranav082001)")
54
+ # st.markdown(
55
+ # "Source code: [GitHub Repository](git link)")
56
+ # )
57
+
58
+ file=st.file_uploader("Please upload the image",type=["jpg","jpeg","png"])
59
+ check=st.checkbox("Dsiplay Mask", value=False)
60
+
61
+
62
  print(file)
63
  if file is None:
64
  st.text("Please Upload an image")
 
69
  inp_img,blurred=blurr_image(opencv_image,pred)
70
  st.text("Original")
71
  st.image(inp_img)
72
+ if check:
73
+ st.text("Mask!!")
74
+ st.image(pred)
75
  st.text("Blurred")
76
  st.image(blurred)