File size: 424 Bytes
7f0ad73
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
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)