Akash James commited on
Commit
000a894
1 Parent(s): 2f675f6

Add timestamp

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -3,6 +3,7 @@ import torch
3
  import process_stylization
4
  from photo_wct import PhotoWCT
5
  import gradio as gr
 
6
 
7
  # Load model
8
  model_path = './models/photo_wct.pth'
@@ -10,6 +11,10 @@ p_wct = PhotoWCT()
10
  p_wct.load_state_dict(torch.load(model_path))
11
 
12
  def run(content_img, style_img, cuda, post_processing, fast):
 
 
 
 
13
  if fast == 0:
14
  from photo_gif import GIFSmoothing
15
  p_pro = GIFSmoothing(r=35, eps=0.001)
@@ -28,7 +33,7 @@ def run(content_img, style_img, cuda, post_processing, fast):
28
  cuda=cuda,
29
  post_processing=post_processing
30
  )
31
-
32
  return output_img
33
 
34
  if __name__ == '__main__':
 
3
  import process_stylization
4
  from photo_wct import PhotoWCT
5
  import gradio as gr
6
+ from datetime import datetime
7
 
8
  # Load model
9
  model_path = './models/photo_wct.pth'
 
11
  p_wct.load_state_dict(torch.load(model_path))
12
 
13
  def run(content_img, style_img, cuda, post_processing, fast):
14
+ now = datetime.now()
15
+ dt_string = now.strftime("%d/%m/%Y %H:%M:%S")
16
+ print("[TimeStamp] {}".format(dt_string))
17
+
18
  if fast == 0:
19
  from photo_gif import GIFSmoothing
20
  p_pro = GIFSmoothing(r=35, eps=0.001)
 
33
  cuda=cuda,
34
  post_processing=post_processing
35
  )
36
+
37
  return output_img
38
 
39
  if __name__ == '__main__':