LennardZuendorf commited on
Commit
4577044
1 Parent(s): 30049a9

fix: adding plot to main ui

Browse files
Files changed (2) hide show
  1. backend/controller.py +8 -10
  2. main.py +2 -2
backend/controller.py CHANGED
@@ -59,15 +59,13 @@ def interference(
59
  raise RuntimeError("There was an error in the selected XAI approach.")
60
 
61
  # call the explained chat function with the model instance
62
- prompt_output, history_output, xai_interactive, xai_markup, xai_plot = (
63
- explained_chat(
64
- model=model,
65
- xai=xai,
66
- message=prompt,
67
- history=history,
68
- system_prompt=system_prompt,
69
- knowledge=knowledge,
70
- )
71
  )
72
  # if no XAI approach is selected call the vanilla chat function
73
  else:
@@ -86,7 +84,7 @@ def interference(
86
  no graphic will be displayed</h4></div>
87
  """,
88
  [("", "")],
89
- None,
90
  )
91
 
92
  # return the outputs
 
59
  raise RuntimeError("There was an error in the selected XAI approach.")
60
 
61
  # call the explained chat function with the model instance
62
+ prompt_output, history_output, xai_interactive, xai_markup, xai_plot = explained_chat(
63
+ model=model,
64
+ xai=xai,
65
+ message=prompt,
66
+ history=history,
67
+ system_prompt=system_prompt,
68
+ knowledge=knowledge,
 
 
69
  )
70
  # if no XAI approach is selected call the vanilla chat function
71
  else:
 
84
  no graphic will be displayed</h4></div>
85
  """,
86
  [("", "")],
87
+ None
88
  )
89
 
90
  # return the outputs
main.py CHANGED
@@ -272,7 +272,7 @@ with gr.Blocks(
272
  xai_selection,
273
  model_selection,
274
  ],
275
- [user_prompt, chatbot, xai_interactive, xai_text],
276
  )
277
  # function triggered by the enter key
278
  user_prompt.submit(
@@ -285,7 +285,7 @@ with gr.Blocks(
285
  xai_selection,
286
  model_selection,
287
  ],
288
- [user_prompt, chatbot, xai_interactive, xai_text],
289
  )
290
 
291
  # final row to show legal information
 
272
  xai_selection,
273
  model_selection,
274
  ],
275
+ [user_prompt, chatbot, xai_interactive, xai_text, xai_plot],
276
  )
277
  # function triggered by the enter key
278
  user_prompt.submit(
 
285
  xai_selection,
286
  model_selection,
287
  ],
288
+ [user_prompt, chatbot, xai_interactive, xai_text, xai_plot],
289
  )
290
 
291
  # final row to show legal information