import gradio as gr def predict(text, request: gr.Request): # Extract the relevant information from the query_params object query_params_dict = { key: value for key, value in request.query_params.items() } # Return the extracted information in a JSON serializable format return { "query_params": query_params_dict } gr.Interface(predict, "text", "json").queue().launch() '''import gradio as gr def predict(text, request: gr.Request): query_params = request.query_params return { "query_params": query_params } gr.Interface(predict, "text", "json").queue().launch()'''