Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: bit misspell comment Slider info #15

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions control_gen_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -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
return generate_texts, clip_scores