pentarosarium commited on
Commit
49b8374
·
1 Parent(s): f68382f
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -645,7 +645,7 @@ def create_interface():
645
  control = ProcessControl()
646
 
647
  with gr.Blocks(theme=gr.themes.Soft()) as app:
648
- gr.Markdown("# AI-анализ мониторинга новостей v.1.37")
649
 
650
  with gr.Row():
651
  file_input = gr.File(
@@ -855,7 +855,13 @@ def create_interface():
855
  finally:
856
  if detector:
857
  detector.cleanup()
858
-
 
 
 
 
 
 
859
  stop_btn.click(fn=stop_processing, outputs=[progress])
860
  analyze_btn.click(
861
  fn=process_and_download,
 
645
  control = ProcessControl()
646
 
647
  with gr.Blocks(theme=gr.themes.Soft()) as app:
648
+ gr.Markdown("# AI-анализ мониторинга новостей v.1.38")
649
 
650
  with gr.Row():
651
  file_input = gr.File(
 
855
  finally:
856
  if detector:
857
  detector.cleanup()
858
+
859
+ def handle_file_download(file_bytes):
860
+ """Handle file download when button is clicked"""
861
+ if file_bytes is not None:
862
+ return (file_bytes, "результаты_анализа.xlsx")
863
+ return None
864
+
865
  stop_btn.click(fn=stop_processing, outputs=[progress])
866
  analyze_btn.click(
867
  fn=process_and_download,