Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,16 @@ DEFAULT_PARAMS = {
|
|
10 |
"do_sample": False,
|
11 |
"max_new_tokens": 256,
|
12 |
}
|
13 |
-
DEFAULT_QUERY =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
DTYPE = torch.bfloat16
|
16 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
@@ -75,7 +84,7 @@ css = """
|
|
75 |
border-radius: 15px;
|
76 |
border: 2px solid #333; /* Darker outline */
|
77 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Enhanced shadow */
|
78 |
-
max-width:
|
79 |
margin: auto;
|
80 |
}
|
81 |
#input_image {
|
@@ -91,8 +100,8 @@ css = """
|
|
91 |
border-radius: 8px;
|
92 |
}
|
93 |
#run_button {
|
94 |
-
background-color: #
|
95 |
-
color:
|
96 |
border-radius: 10px;
|
97 |
padding: 10px;
|
98 |
cursor: pointer;
|
|
|
10 |
"do_sample": False,
|
11 |
"max_new_tokens": 256,
|
12 |
}
|
13 |
+
DEFAULT_QUERY = (
|
14 |
+
"Provide a factual description of this image in up to two paragraphs. "
|
15 |
+
"Include details on objects, background, scenery, interactions, gestures, poses, and any visible text content. "
|
16 |
+
"Specify the number of repeated objects. "
|
17 |
+
"Describe the dominant colors, color contrasts, textures, and materials. "
|
18 |
+
"Mention the composition, including the arrangement of elements and focus points. "
|
19 |
+
"Note the camera angle or perspective, and provide any identifiable contextual information. "
|
20 |
+
"Include details on the style, lighting, and shadows. "
|
21 |
+
"Avoid subjective interpretations or speculation."
|
22 |
+
)
|
23 |
|
24 |
DTYPE = torch.bfloat16
|
25 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
84 |
border-radius: 15px;
|
85 |
border: 2px solid #333; /* Darker outline */
|
86 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Enhanced shadow */
|
87 |
+
max-width: 500px;
|
88 |
margin: auto;
|
89 |
}
|
90 |
#input_image {
|
|
|
100 |
border-radius: 8px;
|
101 |
}
|
102 |
#run_button {
|
103 |
+
background-color: #fff; /* Dark button color */
|
104 |
+
color: black; /* White text */
|
105 |
border-radius: 10px;
|
106 |
padding: 10px;
|
107 |
cursor: pointer;
|