Skip to content

Commit 6801817

Browse files
CopilotJacobLinCool
andcommitted
Support Gradio v6 in version check and update documentation
Co-authored-by: JacobLinCool <28478594+JacobLinCool@users.noreply.github.com>
1 parent 1dc4257 commit 6801817

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Gradio Client in Rust.
1414
- [x] Command-line interface
1515
- [x] Synchronous and asynchronous API
1616

17-
> Supposed to work with Gradio 5 & 4, other versions are not tested.
17+
> Supposed to work with Gradio 6, 5 & 4, other versions are not tested.
1818
1919
## Documentation
2020

src/client.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,12 @@ impl Client {
233233
let json = res.json::<serde_json::Value>().await?;
234234
let config: AppConfigVersionOnly = serde_json::from_value(json.clone())?;
235235

236-
if !config.version.starts_with("5.") && !config.version.starts_with("4.") {
236+
if !config.version.starts_with("6.")
237+
&& !config.version.starts_with("5.")
238+
&& !config.version.starts_with("4.")
239+
{
237240
eprintln!(
238-
"Warning: This client is supposed to work with Gradio 5 & 4. The current version of the app is {}, which may cause issues.",
241+
"Warning: This client is supposed to work with Gradio 6, 5 & 4. The current version of the app is {}, which may cause issues.",
239242
config.version
240243
);
241244
}

0 commit comments

Comments
 (0)