kaenova's picture
Adding api capabilities
7f0ad73
raw
history blame contribute delete
424 Bytes
from gradio_client import Client
client = Client("http://127.0.0.1:7860/")
result = client.predict(
"Howdy!", # str representing string value in 'Input Text' Textbox component
"fastText", # str representing Option from: ['IndoBERTweet', 'CNN', 'fastText'] in 'Model' Dropdown component
'1', # str representing string value in 'Scenario Number' Radio component
api_name="/predict_single_text"
)
print(result)