abalakrishnaTRI
commited on
Commit
•
c10578e
1
Parent(s):
6c1bfb9
fix
Browse files- serve/__init__.py +7 -14
- serve/gradio_web_server.py +0 -27
serve/__init__.py
CHANGED
@@ -5,31 +5,24 @@ from collections import OrderedDict
|
|
5 |
MODEL_ID_TO_NAME = OrderedDict(
|
6 |
[
|
7 |
(
|
8 |
-
"
|
9 |
-
"PrismaticVLM 13B - Chat",
|
10 |
-
),
|
11 |
-
(
|
12 |
-
"llava-lvis4v-lrv+redux-lvis4v-lrv-resize-naive-dinosiglip-vit-so-14-384px-no-align+7b+stage-finetune+x7",
|
13 |
-
"PrismaticVLM 7B - Chat",
|
14 |
-
),
|
15 |
-
(
|
16 |
-
"llava-lvis4v-lrv+redux-lvis4v-lrv-resize-naive-dinosiglip-vit-so-14-384px-no-align-llama2pure+13b+stage-finetune+x7",
|
17 |
"PrismaticVLM 13B",
|
18 |
),
|
19 |
(
|
20 |
-
"
|
21 |
"PrismaticVLM 7B",
|
22 |
),
|
23 |
(
|
24 |
-
"
|
25 |
"PrismaticVLM 13B (Controlled)",
|
26 |
),
|
27 |
(
|
28 |
-
"
|
29 |
"PrismaticVLM 7B (Controlled)",
|
30 |
),
|
31 |
-
("llava-v1.5-13b", "LLaVA 1.5
|
32 |
-
("llava-v1.5-7b", "LLaVA 1.5
|
|
|
33 |
]
|
34 |
)
|
35 |
|
|
|
5 |
MODEL_ID_TO_NAME = OrderedDict(
|
6 |
[
|
7 |
(
|
8 |
+
"prism-dinosiglip+13b",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
"PrismaticVLM 13B",
|
10 |
),
|
11 |
(
|
12 |
+
"prism-dinosiglip+7b",
|
13 |
"PrismaticVLM 7B",
|
14 |
),
|
15 |
(
|
16 |
+
"prism-dinosiglip-controlled+13b",
|
17 |
"PrismaticVLM 13B (Controlled)",
|
18 |
),
|
19 |
(
|
20 |
+
"prism-dinosiglip-controlled+7b",
|
21 |
"PrismaticVLM 7B (Controlled)",
|
22 |
),
|
23 |
+
("llava-v1.5-13b", "LLaVA 1.5 13B"),
|
24 |
+
("llava-v1.5-7b", "LLaVA 1.5 7B"),
|
25 |
+
("instructblip-vicuna-7b", "InstructBLIP 7B"),
|
26 |
]
|
27 |
)
|
28 |
|
serve/gradio_web_server.py
CHANGED
@@ -93,24 +93,6 @@ def vote_last_response(state, vote_type, model_selector, request: gr.Request):
|
|
93 |
fout.write(json.dumps(data) + "\n")
|
94 |
|
95 |
|
96 |
-
# def upvote_last_response(state, model_selector, request: gr.Request):
|
97 |
-
# logger.info(f"upvote. ip: {request.client.host}")
|
98 |
-
# vote_last_response(state, "upvote", model_selector, request)
|
99 |
-
# return ("",) + (disable_btn,) * 3
|
100 |
-
|
101 |
-
|
102 |
-
# def downvote_last_response(state, model_selector, request: gr.Request):
|
103 |
-
# logger.info(f"downvote. ip: {request.client.host}")
|
104 |
-
# vote_last_response(state, "downvote", model_selector, request)
|
105 |
-
# return ("",) + (disable_btn,) * 3
|
106 |
-
|
107 |
-
|
108 |
-
# def flag_last_response(state, model_selector, request: gr.Request):
|
109 |
-
# logger.info(f"flag. ip: {request.client.host}")
|
110 |
-
# vote_last_response(state, "flag", model_selector, request)
|
111 |
-
# return ("",) + (disable_btn,) * 3
|
112 |
-
|
113 |
-
|
114 |
def regenerate(state, image_process_mode, request: gr.Request):
|
115 |
logger.info(f"regenerate. ip: {request.client.host}")
|
116 |
state.messages[-1][-1] = None
|
@@ -388,15 +370,6 @@ def build_demo(embed_mode):
|
|
388 |
|
389 |
# Register listeners
|
390 |
btn_list = [regenerate_btn, clear_btn]
|
391 |
-
# upvote_btn.click(
|
392 |
-
# upvote_last_response, [state, model_selector], [textbox, upvote_btn, downvote_btn, flag_btn], queue=False
|
393 |
-
# )
|
394 |
-
# downvote_btn.click(
|
395 |
-
# downvote_last_response, [state, model_selector], [textbox, upvote_btn, downvote_btn, flag_btn], queue=False
|
396 |
-
# )
|
397 |
-
# flag_btn.click(
|
398 |
-
# flag_last_response, [state, model_selector], [textbox, upvote_btn, downvote_btn, flag_btn], queue=False
|
399 |
-
# )
|
400 |
|
401 |
regenerate_btn.click(
|
402 |
regenerate, [state, image_process_mode], [state, chatbot, textbox, imagebox, *btn_list], queue=False
|
|
|
93 |
fout.write(json.dumps(data) + "\n")
|
94 |
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
def regenerate(state, image_process_mode, request: gr.Request):
|
97 |
logger.info(f"regenerate. ip: {request.client.host}")
|
98 |
state.messages[-1][-1] = None
|
|
|
370 |
|
371 |
# Register listeners
|
372 |
btn_list = [regenerate_btn, clear_btn]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
373 |
|
374 |
regenerate_btn.click(
|
375 |
regenerate, [state, image_process_mode], [state, chatbot, textbox, imagebox, *btn_list], queue=False
|