li-qing commited on
Commit
d710d8b
1 Parent(s): b617fb2

feat: add images

Browse files
assets/fjyn0081_24.png ADDED
src/model/__pycache__/model_registry.cpython-310.pyc CHANGED
Binary files a/src/model/__pycache__/model_registry.cpython-310.pyc and b/src/model/__pycache__/model_registry.cpython-310.pyc differ
 
src/serve/gradio_block_arena_named.py CHANGED
@@ -222,7 +222,7 @@ def add_text(
222
  ]
223
  * 6
224
  )
225
-
226
 
227
  def bot_response_multi(
228
  state0,
@@ -244,7 +244,8 @@ def bot_response_multi(
244
  ) + (no_change_btn,) * 6
245
  return
246
 
247
- states = [state0, state0.copy()]
 
248
  gen = []
249
  for i in range(num_sides):
250
  gen.append(
 
222
  ]
223
  * 6
224
  )
225
+ import copy
226
 
227
  def bot_response_multi(
228
  state0,
 
244
  ) + (no_change_btn,) * 6
245
  return
246
 
247
+ state1.conv.messages = copy.deepcopy(state0.conv.messages)
248
+ states = [state0, state1]
249
  gen = []
250
  for i in range(num_sides):
251
  gen.append(
src/serve/gradio_block_arena_vision_named.py CHANGED
@@ -345,7 +345,16 @@ def build_side_by_side_vision_ui_named(models, random_questions=None):
345
  share_btn = gr.Button(value="📷 Share")
346
  with gr.Row():
347
  gr.Examples(examples=[
348
- [{"files":["assets/clver_1.jpg"], "text": "Hint: Please answer the question and provide the correct option letter, e.g., A, B, C, D, at the end.\nQuestion: Is the number of metal cars that are left of the tiny matte school bus greater than the number of tiny cyan double buss?\nChoices:\n(A) Yes\n(B) No"}],
 
 
 
 
 
 
 
 
 
349
  ],inputs=[textbox])
350
  with gr.Accordion("Parameters", open=False) as parameter_row:
351
  temperature = gr.Slider(
 
345
  share_btn = gr.Button(value="📷 Share")
346
  with gr.Row():
347
  gr.Examples(examples=[
348
+ [
349
+ {
350
+ "files":["assets/clver_1.jpg"],
351
+ "text": "Hint: Please answer the question and provide the correct option letter, e.g., A, B, C, D, at the end.\nQuestion: Is the number of metal cars that are left of the tiny matte school bus greater than the number of tiny cyan double buss?\nChoices:\n(A) Yes\n(B) No"
352
+ },
353
+ {
354
+ "files": ["assets/fjyn0081_24.png"],
355
+ "text": "What is the share of high market in dec?"
356
+ }
357
+ ],
358
  ],inputs=[textbox])
359
  with gr.Accordion("Parameters", open=False) as parameter_row:
360
  temperature = gr.Slider(
vision-tmp-2024-07-17-conv.json CHANGED
@@ -2,3 +2,9 @@
2
  {"tstamp": 1721187677.1121, "type": "chat", "model": "llava-original", "gen_params": {"temperature": 0.7, "top_p": 1.0, "max_new_tokens": 1024}, "start": 1721187654.9088, "finish": 1721187677.1121, "state": {"template_name": "llava-original", "system_message": "You are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language.", "roles": ["user", "assistant"], "messages": [["user", ["Hint: Please answer the question and provide the correct option letter, e.g., A, B, C, D, at the end.\nQuestion: Is the number of metal cars that are left of the tiny matte school bus greater than the number of tiny cyan double buss?\nChoices:\n(A) Yes\n(B) No", ["64978d01710f95e409bd808432fcf5f6"]]], ["assistant", "To answer the question, we need to count the number of metal cars to the left of the tiny matte school bus and compare that to the number of tiny cyan double buses. From the image, there is one metal car to the left of the tiny matte school bus. As for the tiny cyan double buses, there is only one visible in the image. Therefore, the number of metal cars to the left of the tiny matte school bus (which is one) is not greater than the number of tiny cyan double buses (which is also one). The correct answer to the question is:\n\n(B) No"]], "offset": 0, "conv_id": "266d5b0744204770b823ac105d057e95", "model_name": "llava-original", "has_csam_image": false}, "ip": "123.127.249.60"}
3
  {"tstamp": 1721187734.2595, "type": "chat", "model": "llava-fire", "gen_params": {"temperature": 0.7, "top_p": 1.0, "max_new_tokens": 1024}, "start": 1721187693.1243, "finish": 1721187734.2595, "state": {"template_name": "llava-fire", "system_message": "You are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language.", "roles": ["user", "assistant"], "messages": [["user", ["Hint: Please answer the question and provide the correct option letter, e.g., A, B, C, D, at the end.\nQuestion: Is the number of metal cars that are left of the tiny matte school bus greater than the number of tiny cyan double buss?\nChoices:\n(A) Yes\n(B) No", ["64978d01710f95e409bd808432fcf5f6"]]], ["assistant", "To answer the question, we must identify the metal cars to the left of the tiny matte school bus and compare their number to the tiny cyan double buss. The tiny matte school bus is located towards the center of the image. To the left of this school bus, there is one metal car, which is the yellow one. As for the tiny cyan double buss, there is only one visible in the image. Therefore, the number of metal cars to the left of the tiny matte school bus (which is one) is not greater than the number of tiny cyan double buss (which is also one). The correct answer to the question is:\n\n(B) No"], ["user", "Your answer is incorrect"], ["assistant", "I apologize for the mistake. Upon re-examining the image, I can see that there are indeed two metal cars to the left of the tiny matte school bus. Therefore, the number of metal cars to the left of the tiny matte school bus (which is two) is greater than the number of tiny cyan double buss (which is one). The correct answer to the question is:\n\n(A) Yes"]], "offset": 0, "conv_id": "4f508323a8c94301a6fca86688b99adf", "model_name": "llava-fire", "has_csam_image": false}, "ip": "123.127.249.60"}
4
  {"tstamp": 1721187734.2753, "type": "chat", "model": "llava-original", "gen_params": {"temperature": 0.7, "top_p": 1.0, "max_new_tokens": 1024}, "start": 1721187713.7211, "finish": 1721187734.2753, "state": {"template_name": "llava-original", "system_message": "You are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language.", "roles": ["user", "assistant"], "messages": [["user", ["Hint: Please answer the question and provide the correct option letter, e.g., A, B, C, D, at the end.\nQuestion: Is the number of metal cars that are left of the tiny matte school bus greater than the number of tiny cyan double buss?\nChoices:\n(A) Yes\n(B) No", ["64978d01710f95e409bd808432fcf5f6"]]], ["assistant", "To answer the question, we need to count the number of metal cars to the left of the tiny matte school bus and compare that to the number of tiny cyan double buses. From the image, there is one metal car to the left of the tiny matte school bus. As for the tiny cyan double buses, there is only one visible in the image. Therefore, the number of metal cars to the left of the tiny matte school bus (which is one) is not greater than the number of tiny cyan double buses (which is also one). The correct answer to the question is:\n\n(B) No"], ["user", "Your answer is incorrect"], ["assistant", "I apologize for the mistake. Upon re-examining the image, there are no metal cars to the left of the tiny matte school bus. Therefore, the number of metal cars to the left of the tiny matte school bus (which is zero) is not greater than the number of tiny cyan double buses (which is one). The correct answer to the question is:\n\n(B) No"]], "offset": 0, "conv_id": "266d5b0744204770b823ac105d057e95", "model_name": "llava-original", "has_csam_image": false}, "ip": "123.127.249.60"}
 
 
 
 
 
 
 
2
  {"tstamp": 1721187677.1121, "type": "chat", "model": "llava-original", "gen_params": {"temperature": 0.7, "top_p": 1.0, "max_new_tokens": 1024}, "start": 1721187654.9088, "finish": 1721187677.1121, "state": {"template_name": "llava-original", "system_message": "You are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language.", "roles": ["user", "assistant"], "messages": [["user", ["Hint: Please answer the question and provide the correct option letter, e.g., A, B, C, D, at the end.\nQuestion: Is the number of metal cars that are left of the tiny matte school bus greater than the number of tiny cyan double buss?\nChoices:\n(A) Yes\n(B) No", ["64978d01710f95e409bd808432fcf5f6"]]], ["assistant", "To answer the question, we need to count the number of metal cars to the left of the tiny matte school bus and compare that to the number of tiny cyan double buses. From the image, there is one metal car to the left of the tiny matte school bus. As for the tiny cyan double buses, there is only one visible in the image. Therefore, the number of metal cars to the left of the tiny matte school bus (which is one) is not greater than the number of tiny cyan double buses (which is also one). The correct answer to the question is:\n\n(B) No"]], "offset": 0, "conv_id": "266d5b0744204770b823ac105d057e95", "model_name": "llava-original", "has_csam_image": false}, "ip": "123.127.249.60"}
3
  {"tstamp": 1721187734.2595, "type": "chat", "model": "llava-fire", "gen_params": {"temperature": 0.7, "top_p": 1.0, "max_new_tokens": 1024}, "start": 1721187693.1243, "finish": 1721187734.2595, "state": {"template_name": "llava-fire", "system_message": "You are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language.", "roles": ["user", "assistant"], "messages": [["user", ["Hint: Please answer the question and provide the correct option letter, e.g., A, B, C, D, at the end.\nQuestion: Is the number of metal cars that are left of the tiny matte school bus greater than the number of tiny cyan double buss?\nChoices:\n(A) Yes\n(B) No", ["64978d01710f95e409bd808432fcf5f6"]]], ["assistant", "To answer the question, we must identify the metal cars to the left of the tiny matte school bus and compare their number to the tiny cyan double buss. The tiny matte school bus is located towards the center of the image. To the left of this school bus, there is one metal car, which is the yellow one. As for the tiny cyan double buss, there is only one visible in the image. Therefore, the number of metal cars to the left of the tiny matte school bus (which is one) is not greater than the number of tiny cyan double buss (which is also one). The correct answer to the question is:\n\n(B) No"], ["user", "Your answer is incorrect"], ["assistant", "I apologize for the mistake. Upon re-examining the image, I can see that there are indeed two metal cars to the left of the tiny matte school bus. Therefore, the number of metal cars to the left of the tiny matte school bus (which is two) is greater than the number of tiny cyan double buss (which is one). The correct answer to the question is:\n\n(A) Yes"]], "offset": 0, "conv_id": "4f508323a8c94301a6fca86688b99adf", "model_name": "llava-fire", "has_csam_image": false}, "ip": "123.127.249.60"}
4
  {"tstamp": 1721187734.2753, "type": "chat", "model": "llava-original", "gen_params": {"temperature": 0.7, "top_p": 1.0, "max_new_tokens": 1024}, "start": 1721187713.7211, "finish": 1721187734.2753, "state": {"template_name": "llava-original", "system_message": "You are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language.", "roles": ["user", "assistant"], "messages": [["user", ["Hint: Please answer the question and provide the correct option letter, e.g., A, B, C, D, at the end.\nQuestion: Is the number of metal cars that are left of the tiny matte school bus greater than the number of tiny cyan double buss?\nChoices:\n(A) Yes\n(B) No", ["64978d01710f95e409bd808432fcf5f6"]]], ["assistant", "To answer the question, we need to count the number of metal cars to the left of the tiny matte school bus and compare that to the number of tiny cyan double buses. From the image, there is one metal car to the left of the tiny matte school bus. As for the tiny cyan double buses, there is only one visible in the image. Therefore, the number of metal cars to the left of the tiny matte school bus (which is one) is not greater than the number of tiny cyan double buses (which is also one). The correct answer to the question is:\n\n(B) No"], ["user", "Your answer is incorrect"], ["assistant", "I apologize for the mistake. Upon re-examining the image, there are no metal cars to the left of the tiny matte school bus. Therefore, the number of metal cars to the left of the tiny matte school bus (which is zero) is not greater than the number of tiny cyan double buses (which is one). The correct answer to the question is:\n\n(B) No"]], "offset": 0, "conv_id": "266d5b0744204770b823ac105d057e95", "model_name": "llava-original", "has_csam_image": false}, "ip": "123.127.249.60"}
5
+ {"tstamp": 1721188104.5696, "type": "chat", "model": "llava-fire", "gen_params": {"temperature": 0.7, "top_p": 1.0, "max_new_tokens": 1024}, "start": 1721188079.9165, "finish": 1721188104.5696, "state": {"template_name": "llava-fire", "system_message": "You are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language.", "roles": ["user", "assistant"], "messages": [["user", ["Hint: Please answer the question and provide the correct option letter, e.g., A, B, C, D, at the end.\nQuestion: Is the number of metal cars that are left of the tiny matte school bus greater than the number of tiny cyan double buss?\nChoices:\n(A) Yes\n(B) No", ["64978d01710f95e409bd808432fcf5f6"]]], ["assistant", "To answer the question, we must identify the metal cars to the left of the tiny matte school bus and compare their number to the tiny cyan double buss. The tiny matte school bus is located towards the center of the image. To the left of this school bus, there is one metal car, which is the yellow one. As for the tiny cyan double buss, there is only one visible in the image. Therefore, the number of metal cars to the left of the tiny matte school bus (which is one) is not greater than the number of tiny cyan double buss (which is also one). The correct answer to the question is:\n\n(B) No"]], "offset": 0, "conv_id": "9e6e8cfe40e248138411b99dda4d90d5", "model_name": "llava-fire", "has_csam_image": false}, "ip": "123.127.249.60"}
6
+ {"tstamp": 1721188104.5946, "type": "chat", "model": "llava-fire", "gen_params": {"temperature": 0.7, "top_p": 1.0, "max_new_tokens": 1024}, "start": 1721188100.1282, "finish": 1721188104.5946, "state": {"template_name": "llava-fire", "system_message": "You are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language.", "roles": ["user", "assistant"], "messages": [["user", ["Hint: Please answer the question and provide the correct option letter, e.g., A, B, C, D, at the end.\nQuestion: Is the number of metal cars that are left of the tiny matte school bus greater than the number of tiny cyan double buss?\nChoices:\n(A) Yes\n(B) No", ["64978d01710f95e409bd808432fcf5f6"]]], ["assistant", "To answer the question, we must identify the metal cars to the left of the tiny matte school bus and compare their number to the tiny cyan double buss. The tiny matte school bus is located towards the center of the image. To the left of this school bus, there is one metal car, which is the yellow one. As for the tiny cyan double buss, there is only one visible in the image. Therefore, the number of metal cars to the left of the tiny matte school bus (which is one) is not greater than the number of tiny cyan double buss (which is also one). The correct answer to the question is:\n\n(B) No"]], "offset": 0, "conv_id": "9e6e8cfe40e248138411b99dda4d90d5", "model_name": "llava-fire", "has_csam_image": false}, "ip": "123.127.249.60"}
7
+ {"tstamp": 1721188220.454, "type": "chat", "model": "llava-fire", "gen_params": {"temperature": 0.7, "top_p": 1.0, "max_new_tokens": 1024}, "start": 1721188197.5149, "finish": 1721188220.454, "state": {"template_name": "llava-fire", "system_message": "You are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language.", "roles": ["user", "assistant"], "messages": [["user", ["Hint: Please answer the question and provide the correct option letter, e.g., A, B, C, D, at the end.\nQuestion: Is the number of metal cars that are left of the tiny matte school bus greater than the number of tiny cyan double buss?\nChoices:\n(A) Yes\n(B) No", ["64978d01710f95e409bd808432fcf5f6"]]], ["assistant", "To answer the question, we must identify the metal cars to the left of the tiny matte school bus and compare their number to the tiny cyan double buss. The tiny matte school bus is located towards the center of the image. To the left of this school bus, there is one metal car, which is the yellow one. As for the tiny cyan double buss, there is only one visible in the image. Therefore, the number of metal cars to the left of the tiny matte school bus (which is one) is not greater than the number of tiny cyan double buss (which is also one). The correct answer to the question is:\n\n(B) No"], ["user", "Your answer is incorrect"], ["assistant", "I apologize for the mistake. Upon re-examining the image, I can see that there are indeed two metal cars to the left of the tiny matte school bus. Therefore, the number of metal cars to the left of the tiny matte school bus (which is two) is greater than the number of tiny cyan double buss (which is one). The correct answer to the question is:\n\n(A) Yes"]], "offset": 0, "conv_id": "9e6e8cfe40e248138411b99dda4d90d5", "model_name": "llava-fire", "has_csam_image": false}, "ip": "123.127.249.60"}
8
+ {"tstamp": 1721188220.4721, "type": "chat", "model": "llava-fire", "gen_params": {"temperature": 0.7, "top_p": 1.0, "max_new_tokens": 1024}, "start": 1721188217.3063, "finish": 1721188220.4721, "state": {"template_name": "llava-fire", "system_message": "You are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language.", "roles": ["user", "assistant"], "messages": [["user", ["Hint: Please answer the question and provide the correct option letter, e.g., A, B, C, D, at the end.\nQuestion: Is the number of metal cars that are left of the tiny matte school bus greater than the number of tiny cyan double buss?\nChoices:\n(A) Yes\n(B) No", ["64978d01710f95e409bd808432fcf5f6"]]], ["assistant", "To answer the question, we must identify the metal cars to the left of the tiny matte school bus and compare their number to the tiny cyan double buss. The tiny matte school bus is located towards the center of the image. To the left of this school bus, there is one metal car, which is the yellow one. As for the tiny cyan double buss, there is only one visible in the image. Therefore, the number of metal cars to the left of the tiny matte school bus (which is one) is not greater than the number of tiny cyan double buss (which is also one). The correct answer to the question is:\n\n(B) No"], ["user", "Your answer is incorrect"], ["assistant", "I apologize for the mistake. Upon re-examining the image, I can see that there are indeed two metal cars to the left of the tiny matte school bus. Therefore, the number of metal cars to the left of the tiny matte school bus (which is two) is greater than the number of tiny cyan double buss (which is one). The correct answer to the question is:\n\n(A) Yes"]], "offset": 0, "conv_id": "9e6e8cfe40e248138411b99dda4d90d5", "model_name": "llava-fire", "has_csam_image": false}, "ip": "123.127.249.60"}
9
+ {"tstamp": 1721188388.7781, "type": "chat", "model": "llava-fire", "gen_params": {"temperature": 0.7, "top_p": 1.0, "max_new_tokens": 1024}, "start": 1721188341.5433, "finish": 1721188388.7781, "state": {"template_name": "llava-fire", "system_message": "You are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language.", "roles": ["user", "assistant"], "messages": [["user", ["Hint: Please answer the question and provide the correct option letter, e.g., A, B, C, D, at the end.\nQuestion: Is the number of metal cars that are left of the tiny matte school bus greater than the number of tiny cyan double buss?\nChoices:\n(A) Yes\n(B) No", ["64978d01710f95e409bd808432fcf5f6"]]], ["assistant", "To answer the question, we must identify the metal cars to the left of the tiny matte school bus and compare their number to the tiny cyan double buss. The tiny matte school bus is located towards the center of the image. To the left of this school bus, there is one metal car, which is the yellow one. As for the tiny cyan double buss, there is only one visible in the image. Therefore, the number of metal cars to the left of the tiny matte school bus (which is one) is not greater than the number of tiny cyan double buss (which is also one). The correct answer to the question is:\n\n(B) No"]], "offset": 0, "conv_id": "e4aeac72057d45c2a569b33b44ccb5bb", "model_name": "llava-fire", "has_csam_image": false}, "ip": "123.127.249.60"}
10
+ {"tstamp": 1721188388.7999, "type": "chat", "model": "llava-fire", "gen_params": {"temperature": 0.7, "top_p": 1.0, "max_new_tokens": 1024}, "start": 1721188365.1456, "finish": 1721188388.7999, "state": {"template_name": "llava-fire", "system_message": "You are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language.", "roles": ["user", "assistant"], "messages": [["user", ["Hint: Please answer the question and provide the correct option letter, e.g., A, B, C, D, at the end.\nQuestion: Is the number of metal cars that are left of the tiny matte school bus greater than the number of tiny cyan double buss?\nChoices:\n(A) Yes\n(B) No", ["64978d01710f95e409bd808432fcf5f6"]]], ["assistant", "To answer the question, we must identify the metal cars to the left of the tiny matte school bus and compare their number to the tiny cyan double buss. The tiny matte school bus is located towards the center of the image. To the left of this school bus, there is one metal car, which is the yellow one. As for the tiny cyan double buss, there is only one visible in the image. Therefore, the number of metal cars to the left of the tiny matte school bus (which is one) is not greater than the number of tiny cyan double buss (which is also one). The correct answer to the question is:\n\n(B) No"]], "offset": 0, "conv_id": "e4aeac72057d45c2a569b33b44ccb5bb", "model_name": "llava-fire", "has_csam_image": false}, "ip": "123.127.249.60"}