gabar92 commited on
Commit
d07ad97
·
1 Parent(s): a3e894a

update example image input

Browse files
Files changed (1) hide show
  1. app.py +22 -1
app.py CHANGED
@@ -96,6 +96,27 @@ def main():
96
  for image_path in os.listdir(args.example_image_path)
97
  ]
98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  # Load DIE model
100
  die_token = os.getenv("DIE_TOKEN")
101
  model_path = hf_hub_download(
@@ -134,7 +155,7 @@ def parse_arguments():
134
  parser.add_argument("--die_model_path", default="2024_08_09_model_epoch_89.pt")
135
  parser.add_argument("--device", default="cpu")
136
 
137
- parser.add_argument("--example_image_path", default="./example_images")
138
 
139
  return parser.parse_args()
140
 
 
96
  for image_path in os.listdir(args.example_image_path)
97
  ]
98
 
99
+
100
+ # Load example images from the private repository
101
+ example_image_list = []
102
+ example_images = [
103
+ "_002.jpg.jpg",
104
+ "_004.jpg",
105
+ "_005.jpg",
106
+ "_006.jpg",
107
+ "_007.jpg",
108
+ "_010.jpg",
109
+ "_097.jpg",
110
+ ]
111
+
112
+ for image_filename in example_images:
113
+ image_path = hf_hub_download(
114
+ repo_id="gabar92/DIE",
115
+ filename=f"args.example_image_path/{image_filename}",
116
+ use_auth_token=hf_token
117
+ )
118
+ example_image_list.append([Image.open(image_path)])
119
+
120
  # Load DIE model
121
  die_token = os.getenv("DIE_TOKEN")
122
  model_path = hf_hub_download(
 
155
  parser.add_argument("--die_model_path", default="2024_08_09_model_epoch_89.pt")
156
  parser.add_argument("--device", default="cpu")
157
 
158
+ parser.add_argument("--example_image_path", default="example_images")
159
 
160
  return parser.parse_args()
161