Commit
·
546628f
1
Parent(s):
231da44
random
Browse files- llm_inference.py +6 -4
llm_inference.py
CHANGED
@@ -99,7 +99,7 @@ If there are buildings or other structures, describe their architecture, conditi
|
|
99 |
Include sensory details beyond just visual elements - mention sounds, smells, and the overall atmosphere or mood of the scene.
|
100 |
Describe any notable features like bodies of water, geological formations, or sky phenomena.
|
101 |
Consider the perspective from which the scene is viewed and how this affects the composition.
|
102 |
-
Your description should transport the reader to this location, allowing them to vividly imagine the scene without any living subjects present.
|
103 |
Your output is only the caption itself, no comments or extra formatting. The caption is in a single long paragraph."""
|
104 |
|
105 |
landscape_prompt = """Create an immersive and detailed description of a landscape,
|
@@ -145,6 +145,10 @@ Your output is only the caption itself, no comments or extra formatting. The cap
|
|
145 |
|
146 |
# Determine the base prompt
|
147 |
print(f"Received prompt_type: '{prompt_type}'") # Debug print
|
|
|
|
|
|
|
|
|
148 |
if prompt_type and prompt_type.strip() and prompt_type in prompt_types:
|
149 |
base_prompt = prompt_types[prompt_type]
|
150 |
print(f"Using {prompt_type} prompt")
|
@@ -153,9 +157,7 @@ Your output is only the caption itself, no comments or extra formatting. The cap
|
|
153 |
print("Using custom base prompt")
|
154 |
else:
|
155 |
base_prompt = default_long_prompt
|
156 |
-
print(
|
157 |
-
f"Warning: Unknown or empty prompt type '{prompt_type}'. Using default long prompt."
|
158 |
-
)
|
159 |
|
160 |
# Handle compression if applicable
|
161 |
if compress and not poster:
|
|
|
99 |
Include sensory details beyond just visual elements - mention sounds, smells, and the overall atmosphere or mood of the scene.
|
100 |
Describe any notable features like bodies of water, geological formations, or sky phenomena.
|
101 |
Consider the perspective from which the scene is viewed and how this affects the composition.
|
102 |
+
Your description should transport the reader to this location, allowing them to vividly imagine the scene without any living subjects present.
|
103 |
Your output is only the caption itself, no comments or extra formatting. The caption is in a single long paragraph."""
|
104 |
|
105 |
landscape_prompt = """Create an immersive and detailed description of a landscape,
|
|
|
145 |
|
146 |
# Determine the base prompt
|
147 |
print(f"Received prompt_type: '{prompt_type}'") # Debug print
|
148 |
+
if prompt_type == "Random":
|
149 |
+
prompt_type = random.choice(list(prompt_types.keys()))
|
150 |
+
print(f"Randomly selected prompt type: {prompt_type}")
|
151 |
+
|
152 |
if prompt_type and prompt_type.strip() and prompt_type in prompt_types:
|
153 |
base_prompt = prompt_types[prompt_type]
|
154 |
print(f"Using {prompt_type} prompt")
|
|
|
157 |
print("Using custom base prompt")
|
158 |
else:
|
159 |
base_prompt = default_long_prompt
|
160 |
+
print(f"Warning: Unknown or empty prompt type '{prompt_type}'. Using default long prompt.")
|
|
|
|
|
161 |
|
162 |
# Handle compression if applicable
|
163 |
if compress and not poster:
|