gaur3009 commited on
Commit
bd44507
·
verified ·
1 Parent(s): a8d0882

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -8,27 +8,25 @@ import time
8
 
9
  # Defining the repository information and the trigger word
10
  repo = "artificialguybr/TshirtDesignRedmond-V2"
11
- trigger_word = "T shirt design, TshirtDesignAF, "
12
-
13
  # Function to generate image based on the prompt
14
  def infer(color_prompt, dress_type_prompt, design_prompt, text):
15
  # Build the full prompt
16
  prompt = (
17
- f"a single {color_prompt} colored {dress_type_prompt} with {design_prompt} design on the {dress_type_prompt}"
18
  "hangs effortlessly on a plain wall, its simplicity transformed by bold,"
19
  )
20
 
21
  # Conditional parts
22
  if text:
23
  prompt += (
24
- f" contemporary typography reading {text} "
25
  "The contrast between the text and the calm background creates a striking visual"
26
  )
27
 
28
  # Add the hidden shadows part
29
  prompt += f"soft light casts dynamic shadows, adding depth and emphasizing the crisp lines of the design, evoking a sense of modern sophistication."
30
 
31
- full_prompt = f"{prompt} {trigger_word}"
32
 
33
  print("Generating image with prompt:", full_prompt)
34
  api_url = f"https://api-inference.huggingface.co/models/{repo}"
 
8
 
9
  # Defining the repository information and the trigger word
10
  repo = "artificialguybr/TshirtDesignRedmond-V2"
 
 
11
  # Function to generate image based on the prompt
12
  def infer(color_prompt, dress_type_prompt, design_prompt, text):
13
  # Build the full prompt
14
  prompt = (
15
+ f"a single {color_prompt} colored {dress_type_prompt} with {design_prompt} designed on the {color_prompt} colored {dress_type_prompt}"
16
  "hangs effortlessly on a plain wall, its simplicity transformed by bold,"
17
  )
18
 
19
  # Conditional parts
20
  if text:
21
  prompt += (
22
+ f" and {text} written on the {dress_type_prompt}"
23
  "The contrast between the text and the calm background creates a striking visual"
24
  )
25
 
26
  # Add the hidden shadows part
27
  prompt += f"soft light casts dynamic shadows, adding depth and emphasizing the crisp lines of the design, evoking a sense of modern sophistication."
28
 
29
+ full_prompt = f"{prompt}"
30
 
31
  print("Generating image with prompt:", full_prompt)
32
  api_url = f"https://api-inference.huggingface.co/models/{repo}"