Dede16 commited on
Commit
f652ff3
·
1 Parent(s): 48206b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -395,18 +395,18 @@ openai.api_key ='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'
395
 
396
  def get_image(prompt):
397
  api_token="r8_DwF25VNEJXEdjULfkV5gBjYnnJ6pwlg4OmDg7"
398
- client = replicate.Client(api_token=api_token)
399
- output = client.run(
400
- "stability-ai/sdxl:a00d0b7dcbb9c3fbb34ba87d2d5b46c56969c84a628bf778a7fdaec30b1b99c5",
401
- input={"prompt":'Phantasmal iridescent, vibrant color, high contrast, award winning, trending in artstation, digital art,' + prompt.strip(),
402
- "negative_prompt":'NSFW, cityscape',
403
- "width": 1648,
404
- "height":1024}
405
- )
406
- gambar = output
407
- image_url = gambar[0]
408
- response = requests.get(image_url)
409
- return response.content
410
 
411
 
412
  # return tags, content, url #image, image_data
 
395
 
396
  def get_image(prompt):
397
  api_token="r8_DwF25VNEJXEdjULfkV5gBjYnnJ6pwlg4OmDg7"
398
+ client = replicate.Client(api_token=api_token)
399
+ output = client.run(
400
+ "stability-ai/sdxl:a00d0b7dcbb9c3fbb34ba87d2d5b46c56969c84a628bf778a7fdaec30b1b99c5",
401
+ input={"prompt":'Phantasmal iridescent, vibrant color, high contrast, award winning, trending in artstation, digital art,' + prompt.strip(),
402
+ "negative_prompt":'NSFW, cityscape',
403
+ "width": 1648,
404
+ "height":1024}
405
+ )
406
+ gambar = output
407
+ image_url = gambar[0]
408
+ response = requests.get(image_url)
409
+ return response.content
410
 
411
 
412
  # return tags, content, url #image, image_data