hello_sync/hello-sync.rs
1use gradio::{Client, ClientOptions, PredictionInput};
2
3fn main() {
4 let client = Client::new_sync("gradio/hello_world", ClientOptions::default()).unwrap();
5
6 let output = client
7 .predict_sync("/predict", vec![PredictionInput::from_value("Jacob")])
8 .unwrap();
9
10 println!(
11 "Output: {}",
12 output[0].clone().as_value().unwrap().as_str().unwrap()
13 );
14}