tdurbor commited on
Commit
cc82b64
1 Parent(s): d95484f

Seed based on timeé

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -6,6 +6,7 @@ import gradio as gr
6
  import numpy as np
7
  from PIL import Image
8
  import random
 
9
  from db import compute_elo_scores, get_all_votes
10
 
11
  # Configure logging
@@ -54,6 +55,8 @@ def select_new_image():
54
  image_paths = load_images_from_directory("data/resized-original-images")
55
  last_image_path = None
56
  max_attempts = 10
 
 
57
 
58
  for _ in range(max_attempts):
59
  available_images = [path for path in image_paths if path != last_image_path]
 
6
  import numpy as np
7
  from PIL import Image
8
  import random
9
+ import time
10
  from db import compute_elo_scores, get_all_votes
11
 
12
  # Configure logging
 
55
  image_paths = load_images_from_directory("data/resized-original-images")
56
  last_image_path = None
57
  max_attempts = 10
58
+
59
+ random.seed(time.time())
60
 
61
  for _ in range(max_attempts):
62
  available_images = [path for path in image_paths if path != last_image_path]