bilgeyucel commited on
Commit
2554cbe
1 Parent(s): 5b1e523

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -35,7 +35,7 @@ hf_api_key = os.environ["HF_API_KEY"]
35
  def generate_caption(image_file_path, model_name):
36
  image_to_text = ImageCaptioner(model_name="Salesforce/blip-image-captioning-base")
37
  prompt_builder = PromptBuilder(template=prompt_template)
38
- generator = HuggingFaceTGIGenerator(model=model_name, token=Secret.from_token(hf_api_key), generation_kwargs={"max_new_tokens":50})
39
 
40
  captioning_pipeline = Pipeline()
41
  captioning_pipeline.add_component("image_to_text", image_to_text)
 
35
  def generate_caption(image_file_path, model_name):
36
  image_to_text = ImageCaptioner(model_name="Salesforce/blip-image-captioning-base")
37
  prompt_builder = PromptBuilder(template=prompt_template)
38
+ generator = HuggingFaceTGIGenerator(model=model_name, token=Secret.from_token(hf_api_key), generation_kwargs={"max_new_tokens":100})
39
 
40
  captioning_pipeline = Pipeline()
41
  captioning_pipeline.add_component("image_to_text", image_to_text)