Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,13 +15,11 @@ def smart_truncate(text, max_len):
|
|
15 |
def generate_meta(description):
|
16 |
# Упрощенный промт с примерами
|
17 |
prompt = f"""
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
→ Сгенерируй SEO title (до 60 символов) и description (до 160 символов)
|
25 |
"""
|
26 |
inputs = tokenizer(prompt, return_tensors="pt", max_length=512, truncation=True)
|
27 |
|
|
|
15 |
def generate_meta(description):
|
16 |
# Упрощенный промт с примерами
|
17 |
prompt = f"""
|
18 |
+
Create a title and description for product page.
|
19 |
+
Product name: Fenix ARB-L18-4000U
|
20 |
+
Description: Аккумулятор 18650 с встроенным портом Type-C и защитой от перегрузок.
|
21 |
+
Output format:
|
22 |
+
{"title": "...", "description": "..."}
|
|
|
|
|
23 |
"""
|
24 |
inputs = tokenizer(prompt, return_tensors="pt", max_length=512, truncation=True)
|
25 |
|