Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from simulators.fenics_simulation import run_fenics_simulation | |
| def display_simulation(): | |
| # Run FEniCS simulation and return the plot | |
| plot = run_fenics_simulation() | |
| return plot | |
| # Create Gradio interface | |
| iface = gr.Interface(fn=display_simulation, | |
| inputs=[], | |
| outputs="plot", | |
| live=True, | |
| title="FEniCS Simulation") | |
| # Launch the interface | |
| iface.launch() | |