mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
Merge pull request #77 from gradio-app/abidlabs/predict-examples-fix
predict example fix
This commit is contained in:
commit
9551ce400a
@ -38,6 +38,11 @@ var io_master_template = {
|
||||
});
|
||||
},
|
||||
submit_examples: function() {
|
||||
this.target.find(".loading").removeClass("invisible");
|
||||
this.target.find(".loading_in_progress").show();
|
||||
this.target.find(".loading_failed").hide();
|
||||
this.target.find(".output_interfaces").css("opacity", 0.5);
|
||||
|
||||
let example_ids = [];
|
||||
if (this.loaded_examples == null) {
|
||||
this.loaded_examples = {};
|
||||
@ -48,6 +53,9 @@ var io_master_template = {
|
||||
}
|
||||
}
|
||||
this.fn(example_ids, "predict_examples").then((output) => {
|
||||
this.target.find(".loading").addClass("invisible");
|
||||
this.target.find(".output_interfaces").css("opacity", 1);
|
||||
|
||||
output = output["data"];
|
||||
if (!this.has_loaded_examples) {
|
||||
this.has_loaded_examples = true;
|
||||
|
Loading…
Reference in New Issue
Block a user