How do you stop a GUI window from re-opening?

Viewed 26

For some reason the GUI window function restarts when it reaches the end of the code?

Here is the main code:

import dash
from dash import dcc
from dash import html
import plotly.express as px
import pandas as pd
import File_Select_GUI as fsg

#running GUI window
fsg.FSG_Window()

#selecting dataframe
datafile = fsg.selection
df = pd.read_csv(datafile)

Then some code to make graphs:

defend_fig = px.bar(defend_df,
             x='Player',
             y='Touches',
             color='Player')...

Then finally setting up the Dashboard:

app = dash.Dash()

app.layout = html.Div(children=[
    html.Div([
        html.H1('Defenders'),
        dcc.Graph(id="Defenders", figure=defend_fig...
        

#server link output
if __name__ == "__main__":
    app.run_server(debug=True)
0 Answers
Related