Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -255,8 +255,6 @@ with gr.Blocks(css=css, title="ViPer Demo", theme=gr.themes.Base()) as demo:
|
|
255 |
|
256 |
clear_botton = gr.Button("Clear comments", interactive=len(comments) != 0)
|
257 |
|
258 |
-
print(comments)
|
259 |
-
|
260 |
return (gr.Image(value=comment_images[0], label=f"image {image_index+1}/{len(comment_images)}", show_label=True),
|
261 |
gr.Text(label="Comment", show_label=False, lines=4, max_lines=5, placeholder="Enter your comment. The more detailed the better.", value=next_comment, container=False),
|
262 |
gr.Button(f"Extract visual preference from {len(comments)} comments", interactive=len(comments) >= 5, variant="primary"),
|
@@ -305,7 +303,7 @@ with gr.Blocks(css=css, title="ViPer Demo", theme=gr.themes.Base()) as demo:
|
|
305 |
|
306 |
keys = list(comments.keys())
|
307 |
random.shuffle(keys)
|
308 |
-
comments = [(key, comments[key]) for key in keys]
|
309 |
|
310 |
prompt = """I will provide a set of artworks along with accompanying comments from a person. Analyze these artworks and the comments on them and identify artistic features such as present or mentioned colors, style, composition, mood, medium, texture, brushwork, lighting, shadow effects, perspective, and other noteworthy elements.
|
311 |
Your task is to extract the artistic features the person likes and dislikes based on both the artworks' features and the person's comments. Focus solely on artistic aspects and refrain from considering subject matter.
|
|
|
255 |
|
256 |
clear_botton = gr.Button("Clear comments", interactive=len(comments) != 0)
|
257 |
|
|
|
|
|
258 |
return (gr.Image(value=comment_images[0], label=f"image {image_index+1}/{len(comment_images)}", show_label=True),
|
259 |
gr.Text(label="Comment", show_label=False, lines=4, max_lines=5, placeholder="Enter your comment. The more detailed the better.", value=next_comment, container=False),
|
260 |
gr.Button(f"Extract visual preference from {len(comments)} comments", interactive=len(comments) >= 5, variant="primary"),
|
|
|
303 |
|
304 |
keys = list(comments.keys())
|
305 |
random.shuffle(keys)
|
306 |
+
comments = dict([(key, comments[key]) for key in keys])
|
307 |
|
308 |
prompt = """I will provide a set of artworks along with accompanying comments from a person. Analyze these artworks and the comments on them and identify artistic features such as present or mentioned colors, style, composition, mood, medium, texture, brushwork, lighting, shadow effects, perspective, and other noteworthy elements.
|
309 |
Your task is to extract the artistic features the person likes and dislikes based on both the artworks' features and the person's comments. Focus solely on artistic aspects and refrain from considering subject matter.
|