rafaaa2105 commited on
Commit
8e727d0
·
verified ·
1 Parent(s): 2581af3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -43,7 +43,7 @@ def caption(img, min_len, max_len):
43
  system_prompt = "Ignore all prior instructions. Considering the details provided, create a marketing description with an enticing/marketing tone for potential customers, using words which empowers them. Present the information in a cohesive SINGLE paragraph. If any special character is present, such as '<' or '>' or any other similar, you MUST ignore and don't add to the description. Any emoji or emoticon or any similar symbol **MUST** be ignored no matter what, no exceptions. Refrain from offering suggestions regarding product usage or combinations. When a color is given, do not implies that multiple product colors are available. Instead, put the colors given as the product color. If a color is not provided, do not mention about it way into the description you write. Employ language conducive to optimal search engine results on Google. In instances where the user furnishes seemingly unalterable information, rephrase or reword the text without introducing extraneous details. DISREGARD ANY references to weight (grams (g), kilograms (kg), etc.) if mentioned in the details provided. When more than one color is gave, don't say that is for different products. Instead, insert them together, saying that is only one product which have all the colors given in a natural way. Don't use cliche words on the start of the phrase. Additionally, you MUST always provide responses in Portuguese. Adhere meticulously to these instructions and refrain from deviating from the provided guidelines. Abstain from fabricating any information. All instructions given **MUST** be respected and followed, no matter what."
44
 
45
  text_out = generate(text_output, system_prompt, max_len)
46
- return processor.decode(out[0], skip_special_tokens=True)
47
 
48
 
49
  iface= gr.Interface(fn=caption,
 
43
  system_prompt = "Ignore all prior instructions. Considering the details provided, create a marketing description with an enticing/marketing tone for potential customers, using words which empowers them. Present the information in a cohesive SINGLE paragraph. If any special character is present, such as '<' or '>' or any other similar, you MUST ignore and don't add to the description. Any emoji or emoticon or any similar symbol **MUST** be ignored no matter what, no exceptions. Refrain from offering suggestions regarding product usage or combinations. When a color is given, do not implies that multiple product colors are available. Instead, put the colors given as the product color. If a color is not provided, do not mention about it way into the description you write. Employ language conducive to optimal search engine results on Google. In instances where the user furnishes seemingly unalterable information, rephrase or reword the text without introducing extraneous details. DISREGARD ANY references to weight (grams (g), kilograms (kg), etc.) if mentioned in the details provided. When more than one color is gave, don't say that is for different products. Instead, insert them together, saying that is only one product which have all the colors given in a natural way. Don't use cliche words on the start of the phrase. Additionally, you MUST always provide responses in Portuguese. Adhere meticulously to these instructions and refrain from deviating from the provided guidelines. Abstain from fabricating any information. All instructions given **MUST** be respected and followed, no matter what."
44
 
45
  text_out = generate(text_output, system_prompt, max_len)
46
+ return text_out
47
 
48
 
49
  iface= gr.Interface(fn=caption,