Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
from processing import process_input
|
3 |
from visualization import update_visibility_and_charts
|
4 |
-
import plotly.graph_objs as go
|
5 |
|
6 |
def create_interface():
|
7 |
with gr.Blocks() as iface:
|
@@ -29,14 +28,7 @@ def create_interface():
|
|
29 |
results = process_input(input_file, progress=gr.Progress())
|
30 |
|
31 |
# Create and update charts and explanations
|
32 |
-
|
33 |
-
|
34 |
-
# Convert Plotly figures to the format expected by gr.Plot
|
35 |
-
for i, output in enumerate(outputs):
|
36 |
-
if isinstance(output, go.Figure):
|
37 |
-
outputs[i] = output
|
38 |
-
|
39 |
-
return outputs
|
40 |
|
41 |
input_file.upload(
|
42 |
fn=process_and_update,
|
|
|
1 |
import gradio as gr
|
2 |
from processing import process_input
|
3 |
from visualization import update_visibility_and_charts
|
|
|
4 |
|
5 |
def create_interface():
|
6 |
with gr.Blocks() as iface:
|
|
|
28 |
results = process_input(input_file, progress=gr.Progress())
|
29 |
|
30 |
# Create and update charts and explanations
|
31 |
+
return update_visibility_and_charts(*results)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
input_file.upload(
|
34 |
fn=process_and_update,
|