andreska commited on
Commit
4d391cb
·
verified ·
1 Parent(s): 696d098

Fix input method reference and accept two values

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -7,13 +7,14 @@ class State:
7
 
8
  state = State()
9
 
10
- def update_values(context):
11
- state.context = context
12
- return state.context
13
-
 
14
  with gr.Blocks() as demo:
15
  iface = gr.Interface(
16
- fn=answer_question,
17
  inputs=["text", "text"],
18
  outputs="text"
19
  )
 
7
 
8
  state = State()
9
 
10
+ def update_values(context, question):
11
+ state.context = context
12
+ state.question = question
13
+ return "I have stored the new values"
14
+
15
  with gr.Blocks() as demo:
16
  iface = gr.Interface(
17
+ fn=update_values,
18
  inputs=["text", "text"],
19
  outputs="text"
20
  )