File size: 431 Bytes
6c7a215
2c2797b
34eb043
749138f
 
26349dc
749138f
 
 
 
 
 
 
 
 
 
 
e8f20a0
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
from gradio_client import Client

client = Client("Nuno-Tome/API_demo_server")
DEBUG_MODE = True


def request(text):
    #result = client.echo(text, api_name="/predict")
    #return result
    result = client.predict(
		"Hello!!",	# str  in 'text' Textbox component
		api_name="/predict"
    )
    return result

demo = gr.Interface(fn=request, inputs="textbox", outputs="textbox")
    
demo.launch(share=True)