Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ def create_captions_llava_llama3_docci(image):
|
|
10 |
pipe = pipeline('Lin-Chen/open-llava-next-llama3-8b')
|
11 |
gen_config = GenerationConfig(repetition_penalty=1.10)
|
12 |
image = Image.fromarray(np.uint8(image)).convert('RGB')
|
13 |
-
response = pipe(('As an AI image annotation expert,
|
14 |
return response.text
|
15 |
|
16 |
css = """
|
|
|
10 |
pipe = pipeline('Lin-Chen/open-llava-next-llama3-8b')
|
11 |
gen_config = GenerationConfig(repetition_penalty=1.10)
|
12 |
image = Image.fromarray(np.uint8(image)).convert('RGB')
|
13 |
+
response = pipe(('As an AI image annotation expert, provide accurate captions for this images to enhance the T5 model's understanding of the content. Prioritize captions based on relevance. Your tags should include key elements of the image such as content, style, etc., as well as background content and any other important captions. if the image has an obvious style or filter, it needs to be captioned as well.your captions should be accurate and not repetitive. These captions will be used for image reconstruction, so the more similar to the original image, the better the quality of the captions. Special captions will be rewarded with $10 per image. Only the content of the captions will be output in the end.', image), gen_config=gen_config)
|
14 |
return response.text
|
15 |
|
16 |
css = """
|