Spaces:
Sleeping
Sleeping
fruitpicker01
commited on
Commit
•
e932ff5
1
Parent(s):
b8dbf24
Update app.py
Browse files
app.py
CHANGED
@@ -29,25 +29,25 @@ client_mistral_check = Mistral(api_key=MISTRAL_API_KEY)
|
|
29 |
morph = pymorphy3.MorphAnalyzer()
|
30 |
|
31 |
# Авторизация в GigaChat Pro
|
32 |
-
gc_key = os.getenv('GC_KEY')
|
33 |
# chat_pro = GigaChat(credentials=gc_key, model='GigaChat', max_tokens=68, temperature=1.15, verify_ssl_certs=False)
|
34 |
-
chat_pro = GigaChat(
|
35 |
-
credentials=gc_key,
|
36 |
-
model='GigaChat-Pro-preview',
|
37 |
-
base_url='https://gigachat-preview.devices.sberbank.ru/api/v1/',
|
38 |
-
max_tokens=68,
|
39 |
-
temperature=1.15,
|
40 |
-
verify_ssl_certs=False
|
41 |
-
)
|
42 |
-
|
43 |
-
chat_pro_check = GigaChat(
|
44 |
-
credentials=gc_key,
|
45 |
-
model='GigaChat-Pro-preview',
|
46 |
-
base_url='https://gigachat-preview.devices.sberbank.ru/api/v1/',
|
47 |
-
max_tokens=3000,
|
48 |
-
temperature=0.8,
|
49 |
-
verify_ssl_certs=False
|
50 |
-
)
|
51 |
|
52 |
approach_stats = {
|
53 |
"Начни сообщение с призыва к действию с продуктом.": {"failed_checks": defaultdict(int), "total_attempts": 0},
|
@@ -403,7 +403,7 @@ def correct_dash_usage(text):
|
|
403 |
|
404 |
# Шаг 14: Замена чисел вида "5 000 000 р" на "5 млн р"
|
405 |
text = re.sub(r'\b(\d+)\s+000\s+000\s*р\b', r'\1 млн р', text, flags=re.IGNORECASE)
|
406 |
-
|
407 |
text = remove_specific_sentences(text)
|
408 |
|
409 |
return text
|
|
|
29 |
morph = pymorphy3.MorphAnalyzer()
|
30 |
|
31 |
# Авторизация в GigaChat Pro
|
32 |
+
#gc_key = os.getenv('GC_KEY')
|
33 |
# chat_pro = GigaChat(credentials=gc_key, model='GigaChat', max_tokens=68, temperature=1.15, verify_ssl_certs=False)
|
34 |
+
# chat_pro = GigaChat(
|
35 |
+
# credentials=gc_key,
|
36 |
+
# model='GigaChat-Pro-preview',
|
37 |
+
# base_url='https://gigachat-preview.devices.sberbank.ru/api/v1/',
|
38 |
+
# max_tokens=68,
|
39 |
+
# temperature=1.15,
|
40 |
+
# verify_ssl_certs=False
|
41 |
+
#)
|
42 |
+
|
43 |
+
#chat_pro_check = GigaChat(
|
44 |
+
# credentials=gc_key,
|
45 |
+
# model='GigaChat-Pro-preview',
|
46 |
+
# base_url='https://gigachat-preview.devices.sberbank.ru/api/v1/',
|
47 |
+
# max_tokens=3000,
|
48 |
+
# temperature=0.8,
|
49 |
+
# verify_ssl_certs=False
|
50 |
+
#)
|
51 |
|
52 |
approach_stats = {
|
53 |
"Начни сообщение с призыва к действию с продуктом.": {"failed_checks": defaultdict(int), "total_attempts": 0},
|
|
|
403 |
|
404 |
# Шаг 14: Замена чисел вида "5 000 000 р" на "5 млн р"
|
405 |
text = re.sub(r'\b(\d+)\s+000\s+000\s*р\b', r'\1 млн р', text, flags=re.IGNORECASE)
|
406 |
+
text = re.sub(r' р р ', r' р ', text, flags=re.IGNORECASE)
|
407 |
text = remove_specific_sentences(text)
|
408 |
|
409 |
return text
|