Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def generate_image_from_text(pos_prompt):
|
|
50 |
# bedrock_runtime = boto3.client(region_name = 'us-east-1', service_name='bedrock-runtime')
|
51 |
bedrock_runtime = boto3.client(service_name='bedrock-runtime', aws_access_key_id = "AKIAZW3QSPMIH4RF42UA", aws_secret_access_key = "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", region_name='us-east-1')
|
52 |
parameters = {'text_prompts': [{'text':pos_prompt + ", Basic, Flat Design, Minimalist", 'weight':1},
|
53 |
-
{'text': """Blurry, Detailed, Textured, dull, duplicate, bad quality, low resolution, cropped, out of frame, out of focus, pixelated obscure""", 'weight': -1}],
|
54 |
'cfg_scale': 7, 'seed': 0, 'samples': 1}
|
55 |
request_body = json.dumps(parameters)
|
56 |
response = bedrock_runtime.invoke_model(body=request_body,modelId = 'stability.stable-diffusion-xl-v1')
|
|
|
50 |
# bedrock_runtime = boto3.client(region_name = 'us-east-1', service_name='bedrock-runtime')
|
51 |
bedrock_runtime = boto3.client(service_name='bedrock-runtime', aws_access_key_id = "AKIAZW3QSPMIH4RF42UA", aws_secret_access_key = "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", region_name='us-east-1')
|
52 |
parameters = {'text_prompts': [{'text':pos_prompt + ", Basic, Flat Design, Minimalist", 'weight':1},
|
53 |
+
{'text': """Blurry, Detailed, Textured, dull, Multiple, duplicate, bad quality, low resolution, cropped, out of frame, out of focus, pixelated obscure""", 'weight': -1}],
|
54 |
'cfg_scale': 7, 'seed': 0, 'samples': 1}
|
55 |
request_body = json.dumps(parameters)
|
56 |
response = bedrock_runtime.invoke_model(body=request_body,modelId = 'stability.stable-diffusion-xl-v1')
|