backup_v1
Browse files- app.py +1 -1
- search_errors_logic.py +1 -0
app.py
CHANGED
@@ -129,7 +129,7 @@ def main():
|
|
129 |
st.error(f"Ошибка при чтении файла: {e}")
|
130 |
else:
|
131 |
text = st.text_area("Введите текст для проверки:", height=200, key="manual_text")
|
132 |
-
|
133 |
tool = load_assets()
|
134 |
|
135 |
if st.button('Проверить текст'):
|
|
|
129 |
st.error(f"Ошибка при чтении файла: {e}")
|
130 |
else:
|
131 |
text = st.text_area("Введите текст для проверки:", height=200, key="manual_text")
|
132 |
+
|
133 |
tool = load_assets()
|
134 |
|
135 |
if st.button('Проверить текст'):
|
search_errors_logic.py
CHANGED
@@ -196,6 +196,7 @@ def check_text_chat_gpt(text, fixed_text=None, add_errors=False, *args, **kwargs
|
|
196 |
fixed_text = get_gpt_response(prompt_fix_text_gpt.format(text), "vsegpt")
|
197 |
changes = find_corrected_positions(text, fixed_text)
|
198 |
errors = []
|
|
|
199 |
for change in changes:
|
200 |
start_orig, end_orig = get_piece_of_text_bounds(text, change['original'][0], change['original'][1])
|
201 |
start_corr, end_corr = get_piece_of_text_bounds(fixed_text, change['corrected'][0], change['corrected'][1])
|
|
|
196 |
fixed_text = get_gpt_response(prompt_fix_text_gpt.format(text), "vsegpt")
|
197 |
changes = find_corrected_positions(text, fixed_text)
|
198 |
errors = []
|
199 |
+
|
200 |
for change in changes:
|
201 |
start_orig, end_orig = get_piece_of_text_bounds(text, change['original'][0], change['original'][1])
|
202 |
start_corr, end_corr = get_piece_of_text_bounds(fixed_text, change['corrected'][0], change['corrected'][1])
|