bilgeyucel commited on
Commit
ed15729
1 Parent(s): e833e6f

Update app.py

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