vibs08 commited on
Commit
a13a67f
·
verified ·
1 Parent(s): 2a8f71f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -49,8 +49,8 @@ rembg_session = rembg.new_session()
49
  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, 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')
 
49
  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 + "with basic minimal details" , 'weight':1},
53
+ {'text': """Blurry, out of frame, out of focus, Detailed, dull, duplicate, bad quality, low resolution, cropped""", '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')