andreska commited on
Commit
d373d2b
·
verified ·
1 Parent(s): a3e1d8e

Try to give input

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -13,10 +13,10 @@ class State:
13
  state = State()
14
 
15
 
16
- def update_values(update):
17
  # Access updated values from the Textboxes through `update`
18
- context = update["project_data"]
19
- question = update["question"]
20
 
21
  # Update state and return output (optional)
22
  state.context = context
@@ -30,8 +30,8 @@ with gr.Blocks() as iface:
30
 
31
  update_btn = gr.Button("Update")
32
  update_btn.click(
33
- fn=update_values, # Pass the function directly
34
- # Don't use `update` here (it's specific to the function)
35
  outputs=output
36
  )
37
 
 
13
  state = State()
14
 
15
 
16
+ def update_values(project_data, question):
17
  # Access updated values from the Textboxes through `update`
18
+ context = project_data
19
+ question = question
20
 
21
  # Update state and return output (optional)
22
  state.context = context
 
30
 
31
  update_btn = gr.Button("Update")
32
  update_btn.click(
33
+ fn=update_values,
34
+ inputs=['test1', 'test2'],
35
  outputs=output
36
  )
37