From 63707198a39c7d4c460fdc540d720489a9047d33 Mon Sep 17 00:00:00 2001 From: Guspan Tanadi <36249910+guspan-tanadi@users.noreply.github.com> Date: Wed, 20 Sep 2023 19:12:56 +0700 Subject: [PATCH 1/2] docs: bit misspell comment --- control_gen_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/control_gen_utils.py b/control_gen_utils.py index 97f5fc1..a50d9f7 100644 --- a/control_gen_utils.py +++ b/control_gen_utils.py @@ -198,7 +198,7 @@ def control_generate_caption(img_name, model, clip, tokenizer,image_instance,tok prompt="", batch_size=10, max_len=25, top_k=100, temperature=1.0, max_iter=500,alpha=0.7,beta=1,gamma=5, ctl_type="sentiment", style_type="positive",pos_type=None,generate_order="sequential"): - # controllable funcitions to call + # controllable functions to call start_time = time.time() if ctl_type=="sentiment": # sentiment control if generate_order=="sequential": @@ -229,4 +229,4 @@ def control_generate_caption(img_name, model, clip, tokenizer,image_instance,tok logger.info(f"The {i+1}-th image: {img_name[i]}") logger.info(f"final caption: {final_caption[i]}") logger.info(f"best caption: {best_caption[i]}") - return generate_texts, clip_scores \ No newline at end of file + return generate_texts, clip_scores From 11f5ba220a13bd7f1b0985ee3e002064a45f44ed Mon Sep 17 00:00:00 2001 From: Guspan Tanadi <36249910+guspan-tanadi@users.noreply.github.com> Date: Wed, 20 Sep 2023 19:16:30 +0700 Subject: [PATCH 2/2] docs: bit misspell Slider info --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index a9bf7a4..b7d8b67 100644 --- a/app.py +++ b/app.py @@ -225,7 +225,7 @@ def ControlTypeChange(choice): with gr.Row(): Length = gr.Slider( - 5, 15, value=10, label="Sentence Length", info="Choose betwen 5 and 15", step=1 + 5, 15, value=10, label="Sentence Length", info="Choose between 5 and 15", step=1 ) NumIterations = gr.Slider( 1, 15, value=10, label="Num Iterations", info="predefined iterations for Gibbs Sampling", step=1