vibs08 commited on
Commit
f020ac9
·
verified ·
1 Parent(s): e527eff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -9
app.py CHANGED
@@ -87,12 +87,6 @@ def gen_pos_prompt(text):
87
  Additional Details: Keep additional details minimal or specify if not desired.
88
  Keywords for Reference:
89
 
90
- Medium: Digital painting, concept art
91
- Style: Simplified, toy-like (for complex objects), realistic (for simple objects)
92
- Lighting: Soft lighting
93
- Color: Flat colors, basic color
94
- Resolution: Basic resolution
95
- Additional Details: Minimal, clean lines
96
 
97
  Input: {text}
98
  Positive Prompt:
@@ -105,12 +99,12 @@ def gen_pos_prompt(text):
105
  return pos_prompt
106
 
107
  def generate_image_from_text(pos_prompt):
108
- # new_prompt = gen_pos_prompt(pos_prompt)
109
- # print(new_prompt)
110
  neg_prompt = '''Detailed, complex textures, intricate patterns, realistic lighting, high contrast, reflections, fuzzy surface, realistic proportions, photographic quality, vibrant colors, detailed background, shadows, disfigured, deformed, ugly, multiple, duplicate.'''
111
  parameters = {
112
  'taskType': 'TEXT_IMAGE',
113
- 'textToImageParams': {'text': pos_prompt,
114
  'negativeText': neg_prompt},
115
  'imageGenerationConfig': {"cfgScale":8,
116
  "seed":0,
 
87
  Additional Details: Keep additional details minimal or specify if not desired.
88
  Keywords for Reference:
89
 
 
 
 
 
 
 
90
 
91
  Input: {text}
92
  Positive Prompt:
 
99
  return pos_prompt
100
 
101
  def generate_image_from_text(pos_prompt):
102
+ new_prompt = gen_pos_prompt(pos_prompt)
103
+ print(new_prompt)
104
  neg_prompt = '''Detailed, complex textures, intricate patterns, realistic lighting, high contrast, reflections, fuzzy surface, realistic proportions, photographic quality, vibrant colors, detailed background, shadows, disfigured, deformed, ugly, multiple, duplicate.'''
105
  parameters = {
106
  'taskType': 'TEXT_IMAGE',
107
+ 'textToImageParams': {'text': new_prompt,
108
  'negativeText': neg_prompt},
109
  'imageGenerationConfig': {"cfgScale":8,
110
  "seed":0,