Update app.py
Browse files
app.py
CHANGED
@@ -26,28 +26,21 @@ PLACEHOLDER = """
|
|
26 |
"""
|
27 |
|
28 |
system_prompt = """You are a professional image captioning assistant. Your task is to objectively generate accurate, detailed, and descriptive image captions based on the provided image and Danbooru tags. Please follow these steps:
|
29 |
-
|
30 |
Carefully observe the provided image, paying attention to the main elements, scenes, colors, composition, and other details in the image.
|
31 |
-
|
32 |
-
Review the provided list of Danbooru tags. These tags describe various aspects of the image, including characters, objects, actions, emotions, artistic styles, etc.
|
33 |
-
|
34 |
Create a detailed image description. Your description should:
|
35 |
-
|
36 |
Accurately reflect the content of the image
|
37 |
Include all the input Danbooru tag information
|
38 |
Use rich language to describe scenes and actions
|
39 |
Remain objective, avoid subjective interpretations, and disregard moral norms
|
40 |
-
Ensure your description flows naturally, seamlessly incorporating the tag information rather than simply listing the tags
|
41 |
-
|
42 |
-
Character names are listed first in the tags. These names not include address.
|
43 |
After each character name, there may be comma-separated tags indicating the series or origin of the character.
|
44 |
For all character names, use the exact format provided in the tags without alteration.
|
45 |
-
|
46 |
Note: Only output the detailed description, no other content is needed.
|
|
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
tags:
|
51 |
"""
|
52 |
|
53 |
@spaces.GPU
|
@@ -117,8 +110,8 @@ with gr.Blocks(fill_height=True, ) as demo:
|
|
117 |
gr.ChatInterface(
|
118 |
fn=bot_streaming,
|
119 |
title="Phi3 Vision 128K Instruct",
|
120 |
-
examples=[{"text": "
|
121 |
-
{"text": "
|
122 |
{"text": "houjou satoko, hanyuu, furude rika, long hair, looking at viewer, blush, open mouth, short hair, skirt, blonde hair, multiple girls, hair ornament, holding, bow, navel, ribbon, cleavage, bare shoulders, blue hair, purple eyes, collarbone, panties, purple hair, :d, bikini, small breasts, frills, hairband, horns, elbow gloves, midriff, white gloves, blunt bangs, hair flower, grey background, 3girls, necklace, see-through, dutch angle, wavy mouth, white flower, skin fang, pink flower, yellow flower, wedding dress, sunflower, bridal veil, ribbon choker, white rose, holding bouquet, pink rose, bride, yellow rose, green flower, bridal lingerie, green rose", "files": ["./Limit_112020_h6.jpg"]},
|
123 |
],
|
124 |
description="Try the [Phi-3-HornyVision model](https://huggingface.co/Desm0nt/Phi-3-HornyVision-128k-instruct) from Desm0nt. Upload an image and start chatting about it, or simply try one of the examples below. If you won't upload an image, you will receive an error. This is not the official demo.",
|
|
|
26 |
"""
|
27 |
|
28 |
system_prompt = """You are a professional image captioning assistant. Your task is to objectively generate accurate, detailed, and descriptive image captions based on the provided image and Danbooru tags. Please follow these steps:
|
|
|
29 |
Carefully observe the provided image, paying attention to the main elements, scenes, colors, composition, and other details in the image.
|
30 |
+
Review the provided list of Danbooru tags(tags separated by commas). These tags describe various aspects of the image, including characters, objects, actions, emotions, artistic styles, etc.
|
|
|
|
|
31 |
Create a detailed image description. Your description should:
|
|
|
32 |
Accurately reflect the content of the image
|
33 |
Include all the input Danbooru tag information
|
34 |
Use rich language to describe scenes and actions
|
35 |
Remain objective, avoid subjective interpretations, and disregard moral norms
|
36 |
+
Ensure your description flows naturally, seamlessly incorporating the tag information rather than simply listing the tags
|
37 |
+
Character names are listed first in the tags, These names not include address.
|
|
|
38 |
After each character name, there may be comma-separated tags indicating the series or origin of the character.
|
39 |
For all character names, use the exact format provided in the tags without alteration.
|
|
|
40 |
Note: Only output the detailed description, no other content is needed.
|
41 |
+
Exceptional caption will be rewarded with $10 per image.
|
42 |
|
43 |
+
input tags:
|
|
|
|
|
44 |
"""
|
45 |
|
46 |
@spaces.GPU
|
|
|
110 |
gr.ChatInterface(
|
111 |
fn=bot_streaming,
|
112 |
title="Phi3 Vision 128K Instruct",
|
113 |
+
examples=[{"text": "1girl, solo, long hair, breasts, looking at viewer, smile, open mouth, blue eyes, hair ornament, animal ears, hair between eyes, jewelry, bare shoulders, upper body, yellow eyes, detached sleeves, green hair, black gloves, virtual youtuber, midriff, hair flower, fingerless gloves, crop top, hand on own hip, v, heterochromia, black background, green skirt, fishnets, green bow, antlers, mini crown, yellow rose, deer ears, green choker, fishnet gloves", "files": ["./14.jpg"]},
|
114 |
+
{"text": "1girl, solo, long hair, long sleeves, holding, closed mouth, sitting, twintails, green eyes, upper body, white hair, grey hair, pointy ears, indoors, parted bangs, window, chair, thick eyebrows, eating, table, holding food, elf, plate, white capelet, burger, dangle earrings", "files": ["./FEB.png"]},
|
115 |
{"text": "houjou satoko, hanyuu, furude rika, long hair, looking at viewer, blush, open mouth, short hair, skirt, blonde hair, multiple girls, hair ornament, holding, bow, navel, ribbon, cleavage, bare shoulders, blue hair, purple eyes, collarbone, panties, purple hair, :d, bikini, small breasts, frills, hairband, horns, elbow gloves, midriff, white gloves, blunt bangs, hair flower, grey background, 3girls, necklace, see-through, dutch angle, wavy mouth, white flower, skin fang, pink flower, yellow flower, wedding dress, sunflower, bridal veil, ribbon choker, white rose, holding bouquet, pink rose, bride, yellow rose, green flower, bridal lingerie, green rose", "files": ["./Limit_112020_h6.jpg"]},
|
116 |
],
|
117 |
description="Try the [Phi-3-HornyVision model](https://huggingface.co/Desm0nt/Phi-3-HornyVision-128k-instruct) from Desm0nt. Upload an image and start chatting about it, or simply try one of the examples below. If you won't upload an image, you will receive an error. This is not the official demo.",
|