Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,38 +59,37 @@ bedrock_runtime = boto3.client(service_name='bedrock-runtime', aws_access_key_id
|
|
| 59 |
def gen_pos_prompt(text):
|
| 60 |
instruction = f'''Your task is to create a positive prompt for image generation.
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
'''
|
| 94 |
|
| 95 |
body = json.dumps({'inputText': instruction,
|
| 96 |
'textGenerationConfig': {'temperature': 0.1, 'topP': 0.01, 'maxTokenCount':512}})
|
|
|
|
| 59 |
def gen_pos_prompt(text):
|
| 60 |
instruction = f'''Your task is to create a positive prompt for image generation.
|
| 61 |
|
| 62 |
+
Objective: Generate images that prioritize structural integrity and accurate shapes. The focus should be on the correct form and basic contours of objects, with minimal concern for colors.
|
| 63 |
+
|
| 64 |
+
Guidelines:
|
| 65 |
+
|
| 66 |
+
Complex Objects (e.g., animals, vehicles): For these, the image should resemble a toy object, emphasizing the correct shape and structure while minimizing details and color complexity.
|
| 67 |
+
|
| 68 |
+
Example Input: A sports bike
|
| 69 |
+
Example Positive Prompt: Simple sports bike with accurate shape and structure, minimal details, digital painting, concept art style, basic contours, soft lighting, clean lines, neutral or muted colors, toy-like appearance, low contrast.
|
| 70 |
+
|
| 71 |
+
Example Input: A lion
|
| 72 |
+
Example Positive Prompt: Toy-like depiction of a lion with a focus on structural accuracy, minimal details, digital painting, concept art style, basic contours, soft lighting, clean lines, neutral or muted colors, simplified features, low contrast.
|
| 73 |
+
|
| 74 |
+
Simple Objects (e.g., a tennis ball): For these, the prompt should specify a realistic depiction, focusing on the accurate shape and structure.
|
| 75 |
+
|
| 76 |
+
Example Input: A tennis ball
|
| 77 |
+
Example Positive Prompt: Realistic depiction of a tennis ball with accurate shape and texture, digital painting, clean lines, minimal additional details, soft lighting, neutral or muted colors, focus on structural integrity.
|
| 78 |
+
|
| 79 |
+
Prompt Structure:
|
| 80 |
+
|
| 81 |
+
Subject: Clearly describe the object and its essential shape and structure.
|
| 82 |
+
Medium: Specify the art style (e.g., digital painting, concept art).
|
| 83 |
+
Style: Include relevant style terms (e.g., simplified, toy-like for complex objects; realistic for simple objects).
|
| 84 |
+
Resolution: Mention resolution if necessary (e.g., basic resolution).
|
| 85 |
+
Lighting: Indicate the type of lighting (e.g., soft lighting).
|
| 86 |
+
Color: Use neutral or muted colors with minimal emphasis on color details.
|
| 87 |
+
Additional Details: Keep additional details minimal or specify if not desired.
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
Input: {text}
|
| 91 |
+
Positive Prompt:
|
| 92 |
+
'''
|
|
|
|
| 93 |
|
| 94 |
body = json.dumps({'inputText': instruction,
|
| 95 |
'textGenerationConfig': {'temperature': 0.1, 'topP': 0.01, 'maxTokenCount':512}})
|