Spaces:
Running
Running
Commit
·
11a4df0
1
Parent(s):
eeb0c6b
3.35
Browse files
app.py
CHANGED
@@ -189,12 +189,12 @@ def process_file(uploaded_file, model_choice, translation_method='googletrans'):
|
|
189 |
df = pd.read_excel(uploaded_file, sheet_name='Публикации')
|
190 |
llm = init_langchain_llm(model_choice)
|
191 |
|
192 |
-
#
|
193 |
-
translator =
|
194 |
-
|
195 |
-
|
|
|
196 |
)
|
197 |
-
|
198 |
# Validate required columns
|
199 |
required_columns = ['Объект', 'Заголовок', 'Выдержки из текста']
|
200 |
missing_columns = [col for col in required_columns if col not in df.columns]
|
@@ -655,7 +655,7 @@ def create_output_file(df, uploaded_file, llm):
|
|
655 |
|
656 |
def main():
|
657 |
with st.sidebar:
|
658 |
-
st.title("::: AI-анализ мониторинга новостей (v.3.
|
659 |
st.subheader("по материалам СКАН-ИНТЕРФАКС ")
|
660 |
|
661 |
model_choice = st.radio(
|
|
|
189 |
df = pd.read_excel(uploaded_file, sheet_name='Публикации')
|
190 |
llm = init_langchain_llm(model_choice)
|
191 |
|
192 |
+
# In your process_file function:
|
193 |
+
translator = init_translation_system(
|
194 |
+
model_choice=model_choice,
|
195 |
+
translation_method='auto' # Will try deep-translator first, then fal
|
196 |
+
l back to LLM if needed
|
197 |
)
|
|
|
198 |
# Validate required columns
|
199 |
required_columns = ['Объект', 'Заголовок', 'Выдержки из текста']
|
200 |
missing_columns = [col for col in required_columns if col not in df.columns]
|
|
|
655 |
|
656 |
def main():
|
657 |
with st.sidebar:
|
658 |
+
st.title("::: AI-анализ мониторинга новостей (v.3.35 ):::")
|
659 |
st.subheader("по материалам СКАН-ИНТЕРФАКС ")
|
660 |
|
661 |
model_choice = st.radio(
|