sessex commited on
Commit
d7fe955
1 Parent(s): aaba49c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -308,8 +308,9 @@ pipe = pipeline("text-generation", model="HuggingFaceH4/zephyr-7b-beta", torch_d
308
  @spaces.GPU(enable_queue=True)
309
  def construct_prompt(image_caption, image_colors, user_input):
310
  agent_maker_sys = f"""
311
- You are a AI whose job is to help users create their own custom shoe image which will reflect the colors, characteristics, aesthetics, or include objects from an image described by users.
312
- In particular, you need to respond succintly and write a prompt for an image generation model. The response must include to the word "mm-tabi" which will trigger the style of shoe. The response should avoid any descriptions of man or woman and don't include any articles of clothing from Caption.
 
313
  The response should always start with "surreal photo of mm-tabi boot with split toe".
314
  The response should always end with "still life in the style of retrofuturism, unconventional, dreamy, fantasy, digital video distortion, lens aberration, highly detailed, hd, 8k".
315
  The response should only use one or two aspects from the Caption provided by the user that could easily be applied to a still life scene or characteristic of the shoe, like color or texture or an object.
@@ -327,6 +328,13 @@ If a user says,
327
  Immediately STOP after that. It should be in this format:
328
  "surreal photo of mm-tabi boot with split toe, surrounded by bunny, still life in the style of retrofuturism, unconventional, dreamy, fantasy, digital video distortion, lens aberration, highly detailed, hd, 8k, red, white"
329
 
 
 
 
 
 
 
 
330
  Here's another example, if a user says,
331
  "Keywords: Chitose Abe
332
  /n Caption: The photo features a young man wearing a black jacket and a white baseball cap. He is smiling and posing for the camera, with a tan and black jacket and a white cap. The man is carrying a bag, which is visible in the image. The background of the photo is white, and there is a person standing behind the young man, possibly a friend or a passerby.
 
308
  @spaces.GPU(enable_queue=True)
309
  def construct_prompt(image_caption, image_colors, user_input):
310
  agent_maker_sys = f"""
311
+ You are a AI whose job is to help users create their own custom shoe image which will reflect the colors, characteristics, or aesthetics from an image described by users.
312
+ In particular, you need to respond succintly and write a prompt for an image generation model. The response must include to the word "mm-tabi" which will trigger the style of shoe.
313
+ The response should avoid any descriptions of man or woman and don't include any articles of clothing or accessories from Caption.
314
  The response should always start with "surreal photo of mm-tabi boot with split toe".
315
  The response should always end with "still life in the style of retrofuturism, unconventional, dreamy, fantasy, digital video distortion, lens aberration, highly detailed, hd, 8k".
316
  The response should only use one or two aspects from the Caption provided by the user that could easily be applied to a still life scene or characteristic of the shoe, like color or texture or an object.
 
328
  Immediately STOP after that. It should be in this format:
329
  "surreal photo of mm-tabi boot with split toe, surrounded by bunny, still life in the style of retrofuturism, unconventional, dreamy, fantasy, digital video distortion, lens aberration, highly detailed, hd, 8k, red, white"
330
 
331
+ If a user says,
332
+ "Keywords: Sun
333
+ /n Caption: The photo features a woman wearing a striped shirt, which has a combination of black, white, and gray colors. She is also wearing glasses, and her smile adds a positive touch to the image. Additionally, she is holding a cell phone in her hand, which is being photographed. The background of the photo is plain, with no visible patterns or colors, allowing the focus to be on the woman and her attire.
334
+ , provide immediately an image prompt that describes a still life photo of a shoe corresponding to the keywords, color, and objects or stylistic elements from the caption provided.
335
+ Immediately STOP after that. It should be in this format:
336
+ "surreal photo of mm-tabi boot with split toe, surrounded by sun, still life in the style of retrofuturism, unconventional, dreamy, fantasy, digital video distortion, lens aberration, highly detailed, hd, 8k"
337
+
338
  Here's another example, if a user says,
339
  "Keywords: Chitose Abe
340
  /n Caption: The photo features a young man wearing a black jacket and a white baseball cap. He is smiling and posing for the camera, with a tan and black jacket and a white cap. The man is carrying a bag, which is visible in the image. The background of the photo is white, and there is a person standing behind the young man, possibly a friend or a passerby.