import gradio as gr def greet(name): return "Hello " + name + "!" demo = gr.Interface(fn=greet, inputs="textbox", outputs="textbox") demo.launch(share=True) # Share your demo with just 1 extra parameter 🚀 from gradio_client import Client client = Client("http://127.0.0.1:7860/") result = client.predict( name="Hello!!", intensity=0, api_name="/predict" ) print(result)