Spaces:
Running
Running
Andre
commited on
Commit
·
dbdff5d
1
Parent(s):
8fec22d
Bug fix
Browse files- .gitattributes +35 -0
- app.py +1 -4
- config/__pycache__/models.cpython-311.pyc +0 -0
- config/__pycache__/prompts.cpython-311.pyc +0 -0
- config/models.py +1 -1
- config/prompts.py +1 -1
- index.php +2 -2
- src/__pycache__/img_gen.cpython-311.pyc +0 -0
- gallery_content.php → src/gallery_content.php +0 -0
- gallery_functions.php → src/gallery_functions.php +0 -0
- src/img_gen.py +2 -2
.gitattributes
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -6,14 +6,11 @@ from src.img_gen import generate_image
|
|
6 |
# Gradio Interface
|
7 |
def gradio_interface():
|
8 |
with gr.Blocks(css="""
|
9 |
-
|
10 |
.gradio-container {
|
11 |
background-image: url('');
|
12 |
background-size: cover;
|
13 |
background-position: center;
|
14 |
-
|
15 |
}
|
16 |
-
|
17 |
.output-image img {
|
18 |
width: 2500px; /* Force image to fill container width */
|
19 |
object-fit: cover; /* ACTIVATE FOR IMAGE-FIT CONTAINER */
|
@@ -22,7 +19,7 @@ def gradio_interface():
|
|
22 |
gr.Markdown("# ========== Loot Survivor - AI Image Generator ==========")
|
23 |
with gr.Row():
|
24 |
# Set default values for dropdowns
|
25 |
-
prompt_dropdown = gr.Dropdown(choices=[p["alias"] for p in prompts], label="Select
|
26 |
character_dropdown = gr.Dropdown(choices=["Beast only", "Wizard", "Warrior"], label="Select Character", value="Beast only")
|
27 |
model_dropdown = gr.Dropdown(choices=[m["alias"] for m in models], label="Select Model", value=models[0]["alias"])
|
28 |
with gr.Row():
|
|
|
6 |
# Gradio Interface
|
7 |
def gradio_interface():
|
8 |
with gr.Blocks(css="""
|
|
|
9 |
.gradio-container {
|
10 |
background-image: url('');
|
11 |
background-size: cover;
|
12 |
background-position: center;
|
|
|
13 |
}
|
|
|
14 |
.output-image img {
|
15 |
width: 2500px; /* Force image to fill container width */
|
16 |
object-fit: cover; /* ACTIVATE FOR IMAGE-FIT CONTAINER */
|
|
|
19 |
gr.Markdown("# ========== Loot Survivor - AI Image Generator ==========")
|
20 |
with gr.Row():
|
21 |
# Set default values for dropdowns
|
22 |
+
prompt_dropdown = gr.Dropdown(choices=[p["alias"] for p in prompts], label="Select Beast", value=prompts[0]["alias"])
|
23 |
character_dropdown = gr.Dropdown(choices=["Beast only", "Wizard", "Warrior"], label="Select Character", value="Beast only")
|
24 |
model_dropdown = gr.Dropdown(choices=[m["alias"] for m in models], label="Select Model", value=models[0]["alias"])
|
25 |
with gr.Row():
|
config/__pycache__/models.cpython-311.pyc
CHANGED
Binary files a/config/__pycache__/models.cpython-311.pyc and b/config/__pycache__/models.cpython-311.pyc differ
|
|
config/__pycache__/prompts.cpython-311.pyc
CHANGED
Binary files a/config/__pycache__/prompts.cpython-311.pyc and b/config/__pycache__/prompts.cpython-311.pyc differ
|
|
config/models.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
# List of models with aliases
|
2 |
models = [
|
3 |
-
{"alias": "FLUX.1-dev", "name": "black-forest-labs/FLUX.1-dev"},
|
4 |
{"alias": "Midjourney", "name": "strangerzonehf/Flux-Midjourney-Mix2-LoRA"},
|
|
|
5 |
]
|
|
|
1 |
# List of models with aliases
|
2 |
models = [
|
|
|
3 |
{"alias": "Midjourney", "name": "strangerzonehf/Flux-Midjourney-Mix2-LoRA"},
|
4 |
+
{"alias": "FLUX.1-dev", "name": "black-forest-labs/FLUX.1-dev"},
|
5 |
]
|
config/prompts.py
CHANGED
@@ -13,7 +13,7 @@ prompts = [
|
|
13 |
},
|
14 |
{
|
15 |
"alias": "Pixie",
|
16 |
-
"text": "A tiny, mischievous pixie with translucent wings shimmering like stained glass. Its glowing blue eyes and pointed ears give it an otherworldly appearance. It hovers in the air, surrounded by a faint magical aura. Unreal Engine render style, photorealistic, realistic fantasy style."
|
17 |
},
|
18 |
{
|
19 |
"alias": "Wolf",
|
|
|
13 |
},
|
14 |
{
|
15 |
"alias": "Pixie",
|
16 |
+
"text": "A tiny, mischievous evil pixie with translucent wings shimmering like stained glass. Its glowing blue eyes and pointed ears give it an otherworldly appearance. It hovers in the air, surrounded by a faint magical aura. Unreal Engine render style, photorealistic, realistic fantasy style."
|
17 |
},
|
18 |
{
|
19 |
"alias": "Wolf",
|
index.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
-
include '
|
3 |
$imageDirectory = 'images/';
|
4 |
$imageOrder = 'desc';
|
5 |
$images = getImages($imageDirectory, $imageOrder); // 'asc' or 'desc'
|
6 |
-
include 'gallery_content.php';
|
7 |
|
8 |
?>
|
|
|
1 |
<?php
|
2 |
+
include 'src/gallery_functions.php';
|
3 |
$imageDirectory = 'images/';
|
4 |
$imageOrder = 'desc';
|
5 |
$images = getImages($imageDirectory, $imageOrder); // 'asc' or 'desc'
|
6 |
+
include 'src/gallery_content.php';
|
7 |
|
8 |
?>
|
src/__pycache__/img_gen.cpython-311.pyc
CHANGED
Binary files a/src/__pycache__/img_gen.cpython-311.pyc and b/src/__pycache__/img_gen.cpython-311.pyc differ
|
|
gallery_content.php → src/gallery_content.php
RENAMED
File without changes
|
gallery_functions.php → src/gallery_functions.php
RENAMED
File without changes
|
src/img_gen.py
CHANGED
@@ -30,9 +30,9 @@ def generate_image(
|
|
30 |
|
31 |
# Append the custom character (if provided)
|
32 |
if characer_dropdown == "Wizard":
|
33 |
-
prompt += f" A wizard
|
34 |
elif characer_dropdown == "Warrior":
|
35 |
-
prompt += f" A
|
36 |
else:
|
37 |
pass
|
38 |
|
|
|
30 |
|
31 |
# Append the custom character (if provided)
|
32 |
if characer_dropdown == "Wizard":
|
33 |
+
prompt += f" A wizard combats using powerful magic against the {prompt_alias}"
|
34 |
elif characer_dropdown == "Warrior":
|
35 |
+
prompt += f" A warrior combats using his weapons against the {prompt_alias}"
|
36 |
else:
|
37 |
pass
|
38 |
|