Suppose that I have a python gradio interface with a text box in the default "/" path of an html/python website and I want to have a text response in the interface carry over to another textbox/interface in the "/other" path; how are we able to go about doing this?
Knowing about gradio itself, while it is a great way to build an interface for a single model, I reckon one of the shortcomings is that it's quite challenging to make multiple models have a sort of connection. To account for that, I'm trying to use fastapi and mount the gradio apps on an object instance akin to the documentation https://gradio.app/sharing-your-app/#mounting-within-another-fastapi-app
though I find that I'm having either trouble or errors getting the input to carry through. For example:
'''@app get response returning index and other html here,
with gradio apps embedded in the form of html iframes
'''
inp = gr.Interface(
fn=transcribe,
inputs=[
gr.inputs ...
],
outputs=[]
)
outp = gr.Interface(
fn=transcribe,
inputs=[],
outputs=[
gr.Textbox(...)
],
share=True)
app = gr.mount_gradio_app(app, inp, path='/')
app = gr.mount_gradio_app(app, outp, path='/other')
if __name__ == "__main__":
import uvicorn
uvicorn.run(app)
I'm may be using some functions wrong as I'm not too familiar with using gradio interfaces, so please do share the correct way of approach.