Spaces:
Sleeping
Sleeping
Commit ·
55749a1
1
Parent(s): f2d6172
4.12
Browse files
app.py
CHANGED
|
@@ -335,7 +335,7 @@ def estimate_impact(llm, news_text, entity):
|
|
| 335 |
|
| 336 |
Format your response exactly as:
|
| 337 |
Impact: [category]
|
| 338 |
-
Reasoning: [explanation in 2-3 sentences]
|
| 339 |
"""
|
| 340 |
|
| 341 |
prompt = PromptTemplate(template=template, input_variables=["entity", "news"])
|
|
@@ -1016,7 +1016,7 @@ def process_file(uploaded_file, model_choice, translation_method=None):
|
|
| 1016 |
result_df['Сводка'] = svodka_df.to_dict('records')
|
| 1017 |
result_df['Публикации'] = processed_rows_df.to_dict('records')
|
| 1018 |
|
| 1019 |
-
output = create_output_file(result_df, uploaded_file
|
| 1020 |
if output is not None:
|
| 1021 |
st.download_button(
|
| 1022 |
label=f"📊 Скачать результат ({processed_rows} из {total_rows} строк)",
|
|
@@ -1503,7 +1503,7 @@ def main():
|
|
| 1503 |
st.set_page_config(layout="wide")
|
| 1504 |
|
| 1505 |
with st.sidebar:
|
| 1506 |
-
st.title("::: AI-анализ мониторинга новостей (v.4.
|
| 1507 |
st.subheader("по материалам СКАН-ИНТЕРФАКС")
|
| 1508 |
|
| 1509 |
model_choice = st.radio(
|
|
@@ -1643,8 +1643,7 @@ def main():
|
|
| 1643 |
# Create downloadable report
|
| 1644 |
output = create_output_file(
|
| 1645 |
st.session_state.processed_df,
|
| 1646 |
-
uploaded_file
|
| 1647 |
-
init_langchain_llm(model_choice)
|
| 1648 |
)
|
| 1649 |
|
| 1650 |
st.download_button(
|
|
|
|
| 335 |
|
| 336 |
Format your response exactly as:
|
| 337 |
Impact: [category]
|
| 338 |
+
Reasoning: [explanation in 2-3 sentences in Russian]
|
| 339 |
"""
|
| 340 |
|
| 341 |
prompt = PromptTemplate(template=template, input_variables=["entity", "news"])
|
|
|
|
| 1016 |
result_df['Сводка'] = svodka_df.to_dict('records')
|
| 1017 |
result_df['Публикации'] = processed_rows_df.to_dict('records')
|
| 1018 |
|
| 1019 |
+
output = create_output_file(result_df, uploaded_file)
|
| 1020 |
if output is not None:
|
| 1021 |
st.download_button(
|
| 1022 |
label=f"📊 Скачать результат ({processed_rows} из {total_rows} строк)",
|
|
|
|
| 1503 |
st.set_page_config(layout="wide")
|
| 1504 |
|
| 1505 |
with st.sidebar:
|
| 1506 |
+
st.title("::: AI-анализ мониторинга новостей (v.4.12):::")
|
| 1507 |
st.subheader("по материалам СКАН-ИНТЕРФАКС")
|
| 1508 |
|
| 1509 |
model_choice = st.radio(
|
|
|
|
| 1643 |
# Create downloadable report
|
| 1644 |
output = create_output_file(
|
| 1645 |
st.session_state.processed_df,
|
| 1646 |
+
uploaded_file
|
|
|
|
| 1647 |
)
|
| 1648 |
|
| 1649 |
st.download_button(
|