Spaces:
Running
Running
Commit
·
ec09b7b
1
Parent(s):
2541d3c
progress more (3.14)
Browse files
app.py
CHANGED
@@ -463,7 +463,7 @@ def create_output_file(df, uploaded_file, llm):
|
|
463 |
|
464 |
def main():
|
465 |
with st.sidebar:
|
466 |
-
st.title("::: AI-анализ мониторинга новостей (v.3.
|
467 |
st.subheader("по материалам СКАН-ИНТЕРФАКС ")
|
468 |
st.markdown(
|
469 |
"""
|
@@ -474,6 +474,8 @@ def main():
|
|
474 |
""",
|
475 |
unsafe_allow_html=True)
|
476 |
|
|
|
|
|
477 |
with st.expander("ℹ️ Инструкция"):
|
478 |
st.markdown("""
|
479 |
1. Выберите модель для анализа
|
@@ -481,11 +483,8 @@ def main():
|
|
481 |
3. Дождитесь завершения анализа <br/>
|
482 |
4. Скачайте результаты анализа в формате Excel <br/>
|
483 |
""", unsafe_allow_html=True)
|
484 |
-
|
485 |
-
uploaded_file = st.file_uploader("Выбирайте Excel-файл", type="xlsx")
|
486 |
-
|
487 |
|
488 |
-
|
489 |
"""
|
490 |
<style>
|
491 |
.signature {
|
@@ -502,21 +501,20 @@ def main():
|
|
502 |
""",
|
503 |
unsafe_allow_html=True
|
504 |
)
|
505 |
-
|
506 |
st.title("Анализ мониторинга новостей")
|
507 |
|
508 |
if 'processed_df' not in st.session_state:
|
509 |
st.session_state.processed_df = None
|
510 |
|
511 |
-
with
|
512 |
-
|
513 |
|
514 |
if uploaded_file is not None and st.session_state.processed_df is None:
|
515 |
start_time = time.time()
|
516 |
|
517 |
st.session_state.processed_df = process_file(uploaded_file)
|
518 |
|
519 |
-
|
520 |
st.subheader("Предпросмотр данных")
|
521 |
preview_df = st.session_state.processed_df[['Объект', 'Заголовок', 'Sentiment', 'Impact']].head()
|
522 |
st.dataframe(preview_df)
|
|
|
463 |
|
464 |
def main():
|
465 |
with st.sidebar:
|
466 |
+
st.title("::: AI-анализ мониторинга новостей (v.3.14):::")
|
467 |
st.subheader("по материалам СКАН-ИНТЕРФАКС ")
|
468 |
st.markdown(
|
469 |
"""
|
|
|
474 |
""",
|
475 |
unsafe_allow_html=True)
|
476 |
|
477 |
+
# Model selection is now handled in init_langchain_llm()
|
478 |
+
|
479 |
with st.expander("ℹ️ Инструкция"):
|
480 |
st.markdown("""
|
481 |
1. Выберите модель для анализа
|
|
|
483 |
3. Дождитесь завершения анализа <br/>
|
484 |
4. Скачайте результаты анализа в формате Excel <br/>
|
485 |
""", unsafe_allow_html=True)
|
|
|
|
|
|
|
486 |
|
487 |
+
st.markdown(
|
488 |
"""
|
489 |
<style>
|
490 |
.signature {
|
|
|
501 |
""",
|
502 |
unsafe_allow_html=True
|
503 |
)
|
504 |
+
|
505 |
st.title("Анализ мониторинга новостей")
|
506 |
|
507 |
if 'processed_df' not in st.session_state:
|
508 |
st.session_state.processed_df = None
|
509 |
|
510 |
+
# Single file uploader with unique key
|
511 |
+
uploaded_file = st.sidebar.file_uploader("Выбирайте Excel-файл", type="xlsx", key="unique_file_uploader")
|
512 |
|
513 |
if uploaded_file is not None and st.session_state.processed_df is None:
|
514 |
start_time = time.time()
|
515 |
|
516 |
st.session_state.processed_df = process_file(uploaded_file)
|
517 |
|
|
|
518 |
st.subheader("Предпросмотр данных")
|
519 |
preview_df = st.session_state.processed_df[['Объект', 'Заголовок', 'Sentiment', 'Impact']].head()
|
520 |
st.dataframe(preview_df)
|