Spaces:
Running
Running
Update index.html
Browse files135 unmodified lines136137138139140141142143144145146147148149150151135 unmodified lines// Flan-T5 wants a plain string prompt, and explicit instructions// about the output format work best.const prompt = hints? `Rewrite the caption into one fluent natural sentence. ` +`Use the filename hints only if they help describe the image; ` +`otherwise ignore them. Do not add details that are not present. ` +`Caption: ${rawCaption} ` +`Filename hints: ${hints} ` +`Rewritten caption:`: `Rewrite the caption into one fluent natural sentence. ` +`Do not add details that are not present. ` +`Caption: ${rawCaption} ` +`Rewritten caption:`;log("[refine prompt]", prompt);135 unmodified lines136137138139140141142143144145146135 unmodified lines// Flan-T5 wants a plain string prompt, and explicit instructions// about the output format work best.const prompt = hints? `Condense the caption into one sentence. Then add " — " and a short note ` +`identifying the source or subject using these keywords: ${hints}. ` +`Caption: ${rawCaption} ` +`Output:`: `Condense the caption into one sentence. Caption: ${rawCaption} Output:`;log("[refine prompt]", prompt);
index.html+5-10