File size: 436 Bytes
70edc2e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)