Spaces:
Sleeping
Sleeping
File size: 603 Bytes
e8f20a0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
from gradio_client import Client
import gradio as gr
DEBUG_MODE = True
client = Client("Nuno-Tome/API_demo_server")
def request(text):
#if DEBUG_MODE:
result = "Hello World"
# gr.Markdown("client:" + str(client))
# gr.Markdown(f"## Requesting prediction for: {text}")
#result = client.echo(
# "Hello World", # str in 'text' Textbox component
#text,
# api_name="/echo"
#)
#if DEBUG_MODE:
# gr.Markdown(f"## Prediction result: {result}")
# print(f"Prediction result: {result}")
return result
io = gr.Interface(request, "textbox", "json") |