fruitpicker01
commited on
Commit
•
3316769
1
Parent(s):
86ceb05
Update app.py
Browse files
app.py
CHANGED
@@ -1302,7 +1302,7 @@ def check_disconnected_sentences(message):
|
|
1302 |
|
1303 |
response = generate_message_mistral_check(prompt)
|
1304 |
time.sleep(3) # Задержка в 3 секунды между запросами
|
1305 |
-
print("
|
1306 |
result = parse_json_response(response)
|
1307 |
if result is not None:
|
1308 |
decision = result.get("decision", False)
|
@@ -1329,7 +1329,7 @@ def check_synonymous_members(message):
|
|
1329 |
|
1330 |
response = generate_message_mistral_check(prompt)
|
1331 |
time.sleep(3)
|
1332 |
-
print("
|
1333 |
result = parse_json_response(response)
|
1334 |
if result is not None:
|
1335 |
decision = result.get("decision", False)
|
@@ -1368,7 +1368,7 @@ def check_clickbait_phrases(message, description, benefits, key_message):
|
|
1368 |
|
1369 |
response = generate_message_mistral_check(prompt)
|
1370 |
time.sleep(3)
|
1371 |
-
print("
|
1372 |
result = parse_json_response(response)
|
1373 |
if result is not None:
|
1374 |
decision = result.get("decision", False)
|
@@ -1421,7 +1421,7 @@ def check_abstract_claims(message, description, benefits, key_message):
|
|
1421 |
|
1422 |
response = generate_message_mistral_check(prompt)
|
1423 |
time.sleep(3)
|
1424 |
-
print("
|
1425 |
result = parse_json_response(response)
|
1426 |
if result is not None:
|
1427 |
decision = result.get("decision", False)
|
@@ -1458,7 +1458,7 @@ def check_specialized_terms(message):
|
|
1458 |
|
1459 |
response = generate_message_mistral_check(prompt)
|
1460 |
time.sleep(3)
|
1461 |
-
print("
|
1462 |
result = parse_json_response(response)
|
1463 |
if result is not None:
|
1464 |
decision = result.get("decision", False)
|
@@ -1487,7 +1487,7 @@ def check_offensive_phrases(message):
|
|
1487 |
|
1488 |
response = generate_message_mistral_check(prompt)
|
1489 |
time.sleep(3)
|
1490 |
-
print("
|
1491 |
result = parse_json_response(response)
|
1492 |
if result is not None:
|
1493 |
decision = result.get("decision", False)
|
@@ -1533,7 +1533,7 @@ def check_cliches_and_bureaucratese(message, description, benefits, key_message)
|
|
1533 |
|
1534 |
response = generate_message_mistral_check(prompt)
|
1535 |
time.sleep(3)
|
1536 |
-
print("
|
1537 |
result = parse_json_response(response)
|
1538 |
if result is not None:
|
1539 |
decision = result.get("decision", False)
|
@@ -1564,7 +1564,7 @@ def check_no_contradictions(message, description, benefits, key_message):
|
|
1564 |
|
1565 |
response = generate_message_mistral_check(prompt)
|
1566 |
time.sleep(3)
|
1567 |
-
print("
|
1568 |
result = parse_json_response(response)
|
1569 |
if result is not None:
|
1570 |
decision = result.get("decision", False)
|
@@ -1591,7 +1591,7 @@ def check_contains_key_message(message, key_message):
|
|
1591 |
|
1592 |
response = generate_message_mistral_check(prompt)
|
1593 |
time.sleep(3)
|
1594 |
-
print("
|
1595 |
result = parse_json_response(response)
|
1596 |
if result is not None:
|
1597 |
decision = result.get("decision", False)
|
@@ -1621,7 +1621,7 @@ def check_product_name_consistency(message, product_name):
|
|
1621 |
|
1622 |
response = generate_message_mistral_check(prompt)
|
1623 |
time.sleep(3)
|
1624 |
-
print("
|
1625 |
result = parse_json_response(response)
|
1626 |
if result is not None:
|
1627 |
decision = result.get("decision", False)
|
@@ -1875,4 +1875,4 @@ with gr.Blocks() as demo:
|
|
1875 |
outputs=[non_personalized_messages, personalized_messages]
|
1876 |
)
|
1877 |
|
1878 |
-
demo.launch()
|
|
|
1302 |
|
1303 |
response = generate_message_mistral_check(prompt)
|
1304 |
time.sleep(3) # Задержка в 3 секунды между запросами
|
1305 |
+
print("GigaChat Pro response:", response) # Выводим полный ответ модели
|
1306 |
result = parse_json_response(response)
|
1307 |
if result is not None:
|
1308 |
decision = result.get("decision", False)
|
|
|
1329 |
|
1330 |
response = generate_message_mistral_check(prompt)
|
1331 |
time.sleep(3)
|
1332 |
+
print("GigaChat Pro response:", response)
|
1333 |
result = parse_json_response(response)
|
1334 |
if result is not None:
|
1335 |
decision = result.get("decision", False)
|
|
|
1368 |
|
1369 |
response = generate_message_mistral_check(prompt)
|
1370 |
time.sleep(3)
|
1371 |
+
print("GigaChat Pro response:", response)
|
1372 |
result = parse_json_response(response)
|
1373 |
if result is not None:
|
1374 |
decision = result.get("decision", False)
|
|
|
1421 |
|
1422 |
response = generate_message_mistral_check(prompt)
|
1423 |
time.sleep(3)
|
1424 |
+
print("GigaChat Pro response:", response)
|
1425 |
result = parse_json_response(response)
|
1426 |
if result is not None:
|
1427 |
decision = result.get("decision", False)
|
|
|
1458 |
|
1459 |
response = generate_message_mistral_check(prompt)
|
1460 |
time.sleep(3)
|
1461 |
+
print("GigaChat Pro response:", response)
|
1462 |
result = parse_json_response(response)
|
1463 |
if result is not None:
|
1464 |
decision = result.get("decision", False)
|
|
|
1487 |
|
1488 |
response = generate_message_mistral_check(prompt)
|
1489 |
time.sleep(3)
|
1490 |
+
print("GigaChat Pro response:", response)
|
1491 |
result = parse_json_response(response)
|
1492 |
if result is not None:
|
1493 |
decision = result.get("decision", False)
|
|
|
1533 |
|
1534 |
response = generate_message_mistral_check(prompt)
|
1535 |
time.sleep(3)
|
1536 |
+
print("GigaChat Pro response:", response)
|
1537 |
result = parse_json_response(response)
|
1538 |
if result is not None:
|
1539 |
decision = result.get("decision", False)
|
|
|
1564 |
|
1565 |
response = generate_message_mistral_check(prompt)
|
1566 |
time.sleep(3)
|
1567 |
+
print("GigaChat Pro response:", response)
|
1568 |
result = parse_json_response(response)
|
1569 |
if result is not None:
|
1570 |
decision = result.get("decision", False)
|
|
|
1591 |
|
1592 |
response = generate_message_mistral_check(prompt)
|
1593 |
time.sleep(3)
|
1594 |
+
print("GigaChat Pro response:", response)
|
1595 |
result = parse_json_response(response)
|
1596 |
if result is not None:
|
1597 |
decision = result.get("decision", False)
|
|
|
1621 |
|
1622 |
response = generate_message_mistral_check(prompt)
|
1623 |
time.sleep(3)
|
1624 |
+
print("GigaChat Pro response:", response)
|
1625 |
result = parse_json_response(response)
|
1626 |
if result is not None:
|
1627 |
decision = result.get("decision", False)
|
|
|
1875 |
outputs=[non_personalized_messages, personalized_messages]
|
1876 |
)
|
1877 |
|
1878 |
+
demo.launch()
|