Elie Brosset commited on
Commit
b776565
·
1 Parent(s): 4ac77b1

Refactoring

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -19,7 +19,7 @@ app = dash.Dash(
19
  assets_folder="assets",
20
  include_assets_files=True,
21
  )
22
- application = app.server
23
 
24
 
25
  body = dmc.Stack(
@@ -237,8 +237,6 @@ socials = dmc.Affix(
237
  ),
238
  ],
239
  spacing="sm",
240
- mt=5,
241
- mr=5,
242
  ),
243
  position={"top": 10, "left": 10},
244
  )
@@ -462,11 +460,9 @@ def update_stepper_buttons(current, api_key, data):
462
  )
463
  def update_graph(n_clicks, active, api_key, df, prompt, prompt_retry):
464
  if n_clicks is not None and active == 2:
465
- output = predict(api_key, df, prompt)
466
- return prompt, output
467
  elif n_clicks is not None and active == 3:
468
- output = predict(api_key, df, prompt_retry)
469
- return prompt_retry, output
470
  return no_update
471
 
472
 
 
19
  assets_folder="assets",
20
  include_assets_files=True,
21
  )
22
+ server = app.server
23
 
24
 
25
  body = dmc.Stack(
 
237
  ),
238
  ],
239
  spacing="sm",
 
 
240
  ),
241
  position={"top": 10, "left": 10},
242
  )
 
460
  )
461
  def update_graph(n_clicks, active, api_key, df, prompt, prompt_retry):
462
  if n_clicks is not None and active == 2:
463
+ return prompt, predict(api_key, df, prompt)
 
464
  elif n_clicks is not None and active == 3:
465
+ return prompt_retry, predict(api_key, df, prompt_retry)
 
466
  return no_update
467
 
468