Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
import os
|
2 |
import random
|
3 |
-
|
4 |
import gradio as gr
|
5 |
|
6 |
#links
|
@@ -14,6 +13,15 @@ Article = Article + " Originals go here: https://github.com/AaronCWacker/Yggdras
|
|
14 |
|
15 |
|
16 |
def fake_gan():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
images = [
|
18 |
(random.choice(
|
19 |
[
|
|
|
1 |
import os
|
2 |
import random
|
|
|
3 |
import gradio as gr
|
4 |
|
5 |
#links
|
|
|
13 |
|
14 |
|
15 |
def fake_gan():
|
16 |
+
base_dir = os.getcwd() # Get the current base directory
|
17 |
+
png_files = [file for file in os.listdir(base_dir) if file.endswith(".png")] # List all files ending with ".png"
|
18 |
+
|
19 |
+
images = [(random.choice(png_files), f"label {i}" if i != 0 else "label" * 50) for i in range(10)]
|
20 |
+
|
21 |
+
return images
|
22 |
+
|
23 |
+
|
24 |
+
def fake_gan_old():
|
25 |
images = [
|
26 |
(random.choice(
|
27 |
[
|