Ashmi Banerjee commited on
Commit
c45b1d2
1 Parent(s): 0d6a282

clear button bug

Browse files
app.py CHANGED
@@ -25,7 +25,7 @@ def create_ui():
25
 
26
  # Load the buttons for the interface
27
  load_buttons(query, model,
28
- sustainable, starting_point,
29
  max_new_tokens, temperature,
30
  output,
31
  generate_text_fn=generate_text,
 
25
 
26
  # Load the buttons for the interface
27
  load_buttons(query, model,
28
+ sustainable, country, starting_point,
29
  max_new_tokens, temperature,
30
  output,
31
  generate_text_fn=generate_text,
src/ui/components/actions.py CHANGED
@@ -4,7 +4,7 @@ from src.pipeline import pipeline
4
 
5
 
6
  def clear():
7
- return None, None, None, None, None
8
 
9
 
10
  def generate_text(query_text: str,
 
4
 
5
 
6
  def clear():
7
+ return None, None, None, None, None, None
8
 
9
 
10
  def generate_text(query_text: str,
src/ui/components/static.py CHANGED
@@ -51,6 +51,7 @@ def load_buttons(
51
  query: gr.components.Component,
52
  model: gr.components.Component,
53
  sustainable: gr.components.Component,
 
54
  starting_point: gr.components.Component,
55
  max_new_tokens: gr.components.Component,
56
  temperature: gr.components.Component,
@@ -92,12 +93,12 @@ def load_buttons(
92
  clear_btn.click(
93
  fn=clear_fn, # Function to clear inputs
94
  inputs=[], # No inputs for clearing
95
- outputs=[query, model, sustainable, starting_point, output] # Clear all inputs and output
96
  )
97
  cancel_btn.click(
98
  fn=clear_fn, # Function to cancel and clear inputs
99
  inputs=[], # No inputs for cancel
100
- outputs=[query, model, sustainable, starting_point, output] # Clear all inputs and output
101
  )
102
  return btns
103
 
 
51
  query: gr.components.Component,
52
  model: gr.components.Component,
53
  sustainable: gr.components.Component,
54
+ country: gr.components.Component,
55
  starting_point: gr.components.Component,
56
  max_new_tokens: gr.components.Component,
57
  temperature: gr.components.Component,
 
93
  clear_btn.click(
94
  fn=clear_fn, # Function to clear inputs
95
  inputs=[], # No inputs for clearing
96
+ outputs=[query, model, sustainable, starting_point, country, output] # Clear all inputs and output
97
  )
98
  cancel_btn.click(
99
  fn=clear_fn, # Function to cancel and clear inputs
100
  inputs=[], # No inputs for cancel
101
+ outputs=[query, model, sustainable, starting_point, country, output] # Clear all inputs and output
102
  )
103
  return btns
104