Spaces:
Sleeping
Sleeping
Commit ·
d610f41
1
Parent(s): 38c5f49
rollback update stats
Browse files
app.py
CHANGED
|
@@ -1080,6 +1080,19 @@ def process_file(uploaded_file, model_choice, translation_method=None):
|
|
| 1080 |
# Add processed row to DataFrame
|
| 1081 |
processed_rows_df = pd.concat([processed_rows_df, pd.DataFrame([new_row])], ignore_index=True)
|
| 1082 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1083 |
# Update progress
|
| 1084 |
processed_rows += 1
|
| 1085 |
ui.update_progress(processed_rows, total_rows)
|
|
@@ -1532,7 +1545,7 @@ def main():
|
|
| 1532 |
st.set_page_config(layout="wide")
|
| 1533 |
|
| 1534 |
with st.sidebar:
|
| 1535 |
-
st.title("::: AI-анализ мониторинга новостей (v.4.
|
| 1536 |
st.subheader("по материалам СКАН-ИНТЕРФАКС")
|
| 1537 |
|
| 1538 |
model_choice = st.radio(
|
|
|
|
| 1080 |
# Add processed row to DataFrame
|
| 1081 |
processed_rows_df = pd.concat([processed_rows_df, pd.DataFrame([new_row])], ignore_index=True)
|
| 1082 |
|
| 1083 |
+
# Calculate processing speed
|
| 1084 |
+
current_time = time.time()
|
| 1085 |
+
processing_speed = 1.0 / (current_time - last_time) if (current_time - last_time) > 0 else 0
|
| 1086 |
+
last_time = current_time
|
| 1087 |
+
|
| 1088 |
+
# Update UI stats
|
| 1089 |
+
ui.update_stats(
|
| 1090 |
+
row=new_row,
|
| 1091 |
+
sentiment=sentiment,
|
| 1092 |
+
event_type=event_type,
|
| 1093 |
+
processing_speed=processing_speed
|
| 1094 |
+
)
|
| 1095 |
+
|
| 1096 |
# Update progress
|
| 1097 |
processed_rows += 1
|
| 1098 |
ui.update_progress(processed_rows, total_rows)
|
|
|
|
| 1545 |
st.set_page_config(layout="wide")
|
| 1546 |
|
| 1547 |
with st.sidebar:
|
| 1548 |
+
st.title("::: AI-анализ мониторинга новостей (v.4.19):::")
|
| 1549 |
st.subheader("по материалам СКАН-ИНТЕРФАКС")
|
| 1550 |
|
| 1551 |
model_choice = st.radio(
|