File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ def main(config : dict):
5656 with tempfile .NamedTemporaryFile (delete = False , suffix = ".edf" ) as temp_file :
5757 temp_file .write (uploaded_file .read ())
5858 temp_file_path = temp_file .name
59+ #st.write(f'Загружен файл - {temp_file.name}')
5960
6061 input_data = {
6162 "data_edf" : temp_file_path ,
@@ -90,7 +91,6 @@ def main(config : dict):
9091 res = ()
9192 charts = []
9293
93-
9494 # Обработаем результаты программы, поместив в список предложения:
9595 message = []
9696 error = False
@@ -136,6 +136,10 @@ def main(config : dict):
136136 if charts != []:
137137 for chart in charts :
138138 st .plotly_chart (chart , use_container_width = True )
139+
140+ # Очиста временных файлов после инференса
141+ os .remove (temp_file .name )
142+ #st.write(f'Удален файл - {temp_file.name}')
139143
140144 else :
141145 st .warning ("Пожалуйста, загрузите файл .edf для обработки." )
You can’t perform that action at this time.
0 commit comments