Spaces:
Sleeping
Sleeping
Fix input method reference and accept two values
Browse files
app.py
CHANGED
|
@@ -7,13 +7,14 @@ class State:
|
|
| 7 |
|
| 8 |
state = State()
|
| 9 |
|
| 10 |
-
def update_values(context):
|
| 11 |
-
state.context = context
|
| 12 |
-
|
| 13 |
-
|
|
|
|
| 14 |
with gr.Blocks() as demo:
|
| 15 |
iface = gr.Interface(
|
| 16 |
-
fn=
|
| 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 |
)
|