Spaces:
Sleeping
Sleeping
Commit
·
931613d
1
Parent(s):
2683427
v.1.07+
Browse files
app.py
CHANGED
@@ -157,13 +157,13 @@ def create_visualizations(df):
|
|
157 |
|
158 |
def create_interface():
|
159 |
with gr.Blocks(theme=gr.themes.Soft()) as app:
|
160 |
-
gr.Markdown("# AI-анализ мониторинга новостей v.1.
|
161 |
|
162 |
with gr.Row():
|
163 |
file_input = gr.File(
|
164 |
label="Загрузите Excel файл",
|
165 |
file_types=[".xlsx"],
|
166 |
-
type="file"
|
167 |
)
|
168 |
|
169 |
with gr.Row():
|
@@ -197,7 +197,9 @@ def create_interface():
|
|
197 |
return None, None, None, "Ожидание файла"
|
198 |
try:
|
199 |
progress.update("Обработка начата...")
|
200 |
-
|
|
|
|
|
201 |
if df.empty:
|
202 |
return None, None, None, "Нет данных для обработки"
|
203 |
|
|
|
157 |
|
158 |
def create_interface():
|
159 |
with gr.Blocks(theme=gr.themes.Soft()) as app:
|
160 |
+
gr.Markdown("# AI-анализ мониторинга новостей v.1.06")
|
161 |
|
162 |
with gr.Row():
|
163 |
file_input = gr.File(
|
164 |
label="Загрузите Excel файл",
|
165 |
file_types=[".xlsx"],
|
166 |
+
type="binary" # Changed from "file" to "binary"
|
167 |
)
|
168 |
|
169 |
with gr.Row():
|
|
|
197 |
return None, None, None, "Ожидание файла"
|
198 |
try:
|
199 |
progress.update("Обработка начата...")
|
200 |
+
# Modified file handling for binary type
|
201 |
+
temp_file = file.name # For binary type, file.name contains the path
|
202 |
+
df = process_file(temp_file)
|
203 |
if df.empty:
|
204 |
return None, None, None, "Нет данных для обработки"
|
205 |
|