Spaces:
Paused
Paused
change min_length, max_length
Browse files
app.py
CHANGED
|
@@ -394,6 +394,7 @@ Do not hallucinate, do not add information that is not in the product informatio
|
|
| 394 |
Try your best to avoid using the excluded words and phrases.
|
| 395 |
Try your best to include the included words and phrases in the product description.
|
| 396 |
Make sure to keep to the requirements of the structure, writing no more or less than specified.
|
|
|
|
| 397 |
Do not enclose the output in html tags, quotes, braces, brackets or anything.
|
| 398 |
Return the product description only.
|
| 399 |
|
|
@@ -431,7 +432,7 @@ import io
|
|
| 431 |
# return base64.b64encode(image_file.read()).decode('utf-8')
|
| 432 |
|
| 433 |
|
| 434 |
-
def encode_image(image_path, img_size=
|
| 435 |
with open(image_path, "rb") as image_file:
|
| 436 |
# b64_img = base64.b64encode(image_file.read()).decode('utf-8')
|
| 437 |
# b64_img = base64.b64decode(base64.b64encode(response.content))
|
|
|
|
| 394 |
Try your best to avoid using the excluded words and phrases.
|
| 395 |
Try your best to include the included words and phrases in the product description.
|
| 396 |
Make sure to keep to the requirements of the structure, writing no more or less than specified.
|
| 397 |
+
If the structure does not specify a length, write a description that is between {min_length} and {max_length} words.
|
| 398 |
Do not enclose the output in html tags, quotes, braces, brackets or anything.
|
| 399 |
Return the product description only.
|
| 400 |
|
|
|
|
| 432 |
# return base64.b64encode(image_file.read()).decode('utf-8')
|
| 433 |
|
| 434 |
|
| 435 |
+
def encode_image(image_path, img_size=1024):
|
| 436 |
with open(image_path, "rb") as image_file:
|
| 437 |
# b64_img = base64.b64encode(image_file.read()).decode('utf-8')
|
| 438 |
# b64_img = base64.b64decode(base64.b64encode(response.content))
|