Spaces:
Sleeping
Sleeping
fruitpicker01
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -546,7 +546,7 @@ def notify_failed_checks(checks):
|
|
546 |
def generate_message_mistral_with_retry(prompt, approach_name, description, key_message, product_name, benefits):
|
547 |
global approach_stats
|
548 |
last_message = None
|
549 |
-
for attempt in range(
|
550 |
gr.Info(f"Итерация {attempt + 1}: генерируется сообщение...")
|
551 |
message = generate_message_mistral_generate(prompt)
|
552 |
if message is None:
|
@@ -802,8 +802,8 @@ def rank_messages(non_personalized_messages, personalized_messages):
|
|
802 |
ranked_personalized = best_text_choice(personalized_list, unique_sms_df, tokenizer, model)
|
803 |
|
804 |
# Формируем строки для отображения
|
805 |
-
ranked_non_personalized_messages = '\n\n'.join(ranked_non_personalized)
|
806 |
-
ranked_personalized_messages = '\n\n'.join(ranked_personalized)
|
807 |
|
808 |
return ranked_non_personalized_messages, ranked_personalized_messages
|
809 |
|
|
|
546 |
def generate_message_mistral_with_retry(prompt, approach_name, description, key_message, product_name, benefits):
|
547 |
global approach_stats
|
548 |
last_message = None
|
549 |
+
for attempt in range(3):
|
550 |
gr.Info(f"Итерация {attempt + 1}: генерируется сообщение...")
|
551 |
message = generate_message_mistral_generate(prompt)
|
552 |
if message is None:
|
|
|
802 |
ranked_personalized = best_text_choice(personalized_list, unique_sms_df, tokenizer, model)
|
803 |
|
804 |
# Формируем строки для отображения
|
805 |
+
# ranked_non_personalized_messages = '\n\n'.join(ranked_non_personalized)
|
806 |
+
# ranked_personalized_messages = '\n\n'.join(ranked_personalized)
|
807 |
|
808 |
return ranked_non_personalized_messages, ranked_personalized_messages
|
809 |
|