Spaces:
Runtime error
Runtime error
Update app.py
Browse filesAdding random seed
app.py
CHANGED
@@ -31,9 +31,10 @@ def get_captcha(images, indexes):
|
|
31 |
return fig, fake_idx
|
32 |
|
33 |
def get_challenge():
|
|
|
34 |
real_idx = np.random.randint(low=0, high=len(real_files), size=n_real)
|
35 |
real_samples = np.array([plt.imread(real_files[idx]) for idx in real_idx])
|
36 |
-
generated_samples = generate(n_fake, generator)
|
37 |
captcha_samples = np.concatenate((generated_samples, real_samples))
|
38 |
|
39 |
captcha_idx = [x for x in range(len(captcha_samples))]
|
|
|
31 |
return fig, fake_idx
|
32 |
|
33 |
def get_challenge():
|
34 |
+
seed = random.randint(0, 1000)
|
35 |
real_idx = np.random.randint(low=0, high=len(real_files), size=n_real)
|
36 |
real_samples = np.array([plt.imread(real_files[idx]) for idx in real_idx])
|
37 |
+
generated_samples = generate(n_fake, generator, seed)
|
38 |
captcha_samples = np.concatenate((generated_samples, real_samples))
|
39 |
|
40 |
captcha_idx = [x for x in range(len(captcha_samples))]
|