Example:
import gradio as gr
def dummy(a, b='Hello', c='!'):
return '{0} {1} {2}'.format(b, a, c)
with gr.Blocks() as demo:
txt = gr.Textbox(value="test", label="Query", lines=1)
txt2 = gr.Textbox(value="test2", label="Query2", lines=1)
answer = gr.Textbox(value="", label="Answer")
btn = gr.Button(value="Submit")
btn.click(dummy, inputs=[txt], outputs=[answer])
gr.ClearButton([answer])
demo.launch()
How can I have the value of txt2 be given to the dummy()'s named parameter c?

As far as I know, Gradio doesn't directly allow it. I.e., it doesn't allow something like this:
In this specific case, if you can't modify the
dummyfunction then I would rearrange the parameters with the following function:Now, you just need to modify your example as follows: