Charlie Li commited on
Commit
af6d5f7
1 Parent(s): fc90453
Files changed (1) hide show
  1. app.py +16 -6
app.py CHANGED
@@ -1,13 +1,14 @@
1
  import gradio as gr
2
  import os
3
  import random
 
4
  from utils import *
5
 
6
- file_url = "https://storage.googleapis.com/derendering_model/derendering_supp.zip"
7
- filename = "derendering_supp.zip"
8
 
9
- download_file(file_url, filename)
10
- unzip_file(filename)
11
  print("Downloaded and unzipped the file.")
12
 
13
  diagram = get_svg_content("derendering_supp/derender_diagram.svg")
@@ -36,8 +37,17 @@ def demo(Dataset, Model, Output_Format):
36
  text_outputs = []
37
  img_outputs = []
38
  video_outputs = []
39
- print("Output format:", Output_Format)
40
-
 
 
 
 
 
 
 
 
 
41
  for name in picked_samples:
42
  img_path = os.path.join(path, name)
43
  img = load_and_pad_img_dir(img_path)
 
1
  import gradio as gr
2
  import os
3
  import random
4
+ import datetime
5
  from utils import *
6
 
7
+ # file_url = "https://storage.googleapis.com/derendering_model/derendering_supp.zip"
8
+ # filename = "derendering_supp.zip"
9
 
10
+ # download_file(file_url, filename)
11
+ # unzip_file(filename)
12
  print("Downloaded and unzipped the file.")
13
 
14
  diagram = get_svg_content("derendering_supp/derender_diagram.svg")
 
37
  text_outputs = []
38
  img_outputs = []
39
  video_outputs = []
40
+ now = datetime.datetime.now()
41
+ now = now.strftime("%Y-%m-%d %H:%M:%S")
42
+ print(
43
+ now,
44
+ "Taking sample from dataset:",
45
+ Dataset,
46
+ "and model:",
47
+ Model,
48
+ "with output format:",
49
+ Output_Format,
50
+ )
51
  for name in picked_samples:
52
  img_path = os.path.join(path, name)
53
  img = load_and_pad_img_dir(img_path)