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