Spaces:
Running
Running
Commit
·
c58ea62
1
Parent(s):
55c5135
progress more 43+
Browse files- app.py +10 -3
- sample_file.xlsx +0 -0
app.py
CHANGED
@@ -257,11 +257,13 @@ def create_output_file(df, uploaded_file, analysis_df):
|
|
257 |
return output
|
258 |
|
259 |
def main():
|
260 |
-
st.title("... приступим к анализу... версия
|
261 |
|
262 |
uploaded_file = st.file_uploader("Выбирайте Excel-файл", type="xlsx")
|
263 |
|
264 |
if uploaded_file is not None:
|
|
|
|
|
265 |
df = process_file(uploaded_file)
|
266 |
|
267 |
st.subheader("Предпросмотр данных")
|
@@ -285,10 +287,15 @@ def main():
|
|
285 |
analysis_df = create_analysis_data(df)
|
286 |
st.subheader("Анализ")
|
287 |
st.dataframe(analysis_df)
|
288 |
-
|
|
|
|
|
|
|
|
|
|
|
289 |
|
290 |
# Offer download of results
|
291 |
-
|
292 |
st.download_button(
|
293 |
label="Скачать результат анализа новостей",
|
294 |
data=output,
|
|
|
257 |
return output
|
258 |
|
259 |
def main():
|
260 |
+
st.title("... приступим к анализу... версия 43+")
|
261 |
|
262 |
uploaded_file = st.file_uploader("Выбирайте Excel-файл", type="xlsx")
|
263 |
|
264 |
if uploaded_file is not None:
|
265 |
+
start_time = time.time()
|
266 |
+
|
267 |
df = process_file(uploaded_file)
|
268 |
|
269 |
st.subheader("Предпросмотр данных")
|
|
|
287 |
analysis_df = create_analysis_data(df)
|
288 |
st.subheader("Анализ")
|
289 |
st.dataframe(analysis_df)
|
290 |
+
output = create_output_file(df, uploaded_file, analysis_df)
|
291 |
+
|
292 |
+
# Calculate elapsed time
|
293 |
+
end_time = time.time()
|
294 |
+
elapsed_time = end_time - start_time
|
295 |
+
st.success(f"Обработка завершена за {elapsed_time:.2f} секунд.")
|
296 |
|
297 |
# Offer download of results
|
298 |
+
|
299 |
st.download_button(
|
300 |
label="Скачать результат анализа новостей",
|
301 |
data=output,
|
sample_file.xlsx
CHANGED
Binary files a/sample_file.xlsx and b/sample_file.xlsx differ
|
|