Merge branch 'main' of https://huggingface.co/spaces/li-qing/FIRE
Browse files- src/__pycache__/__init__.cpython-310.pyc +0 -0
- src/__pycache__/constants.cpython-310.pyc +0 -0
- src/__pycache__/conversation.cpython-310.pyc +0 -0
- src/__pycache__/utils.cpython-310.pyc +0 -0
- src/conversation.py +2 -2
- src/serve/__pycache__/__init__.cpython-310.pyc +0 -0
- src/serve/__pycache__/api_provider.cpython-310.pyc +0 -0
- src/serve/__pycache__/gradio_block_arena_named.cpython-310.pyc +0 -0
- src/serve/__pycache__/gradio_block_arena_vision.cpython-310.pyc +0 -0
- src/serve/__pycache__/gradio_block_arena_vision_named.cpython-310.pyc +0 -0
- src/serve/__pycache__/gradio_web_server.cpython-310.pyc +0 -0
- src/serve/__pycache__/remote_logger.cpython-310.pyc +0 -0
- src/serve/gradio_web_server.py +1 -1
src/__pycache__/__init__.cpython-310.pyc
DELETED
Binary file (123 Bytes)
|
|
src/__pycache__/constants.cpython-310.pyc
DELETED
Binary file (2.56 kB)
|
|
src/__pycache__/conversation.cpython-310.pyc
DELETED
Binary file (38.8 kB)
|
|
src/__pycache__/utils.cpython-310.pyc
DELETED
Binary file (13.6 kB)
|
|
src/conversation.py
CHANGED
@@ -165,10 +165,10 @@ class Conversation:
|
|
165 |
ret += ""
|
166 |
for i, (role, message) in enumerate(self.messages):
|
167 |
if message:
|
168 |
-
logger.info("msg={}", message)
|
169 |
if type(message) is tuple:
|
170 |
message, images = message
|
171 |
-
message = "<image>" * len(images) + message
|
172 |
ret += f"<|start_header_id|>{role}<|end_header_id|>\n\n"
|
173 |
ret += f"{message.strip()}<|eot_id|>"
|
174 |
else:
|
|
|
165 |
ret += ""
|
166 |
for i, (role, message) in enumerate(self.messages):
|
167 |
if message:
|
168 |
+
logger.info("msg = {}", message)
|
169 |
if type(message) is tuple:
|
170 |
message, images = message
|
171 |
+
message = "<image>" * len(images) + "\n" + message
|
172 |
ret += f"<|start_header_id|>{role}<|end_header_id|>\n\n"
|
173 |
ret += f"{message.strip()}<|eot_id|>"
|
174 |
else:
|
src/serve/__pycache__/__init__.cpython-310.pyc
DELETED
Binary file (129 Bytes)
|
|
src/serve/__pycache__/api_provider.cpython-310.pyc
DELETED
Binary file (17.9 kB)
|
|
src/serve/__pycache__/gradio_block_arena_named.cpython-310.pyc
DELETED
Binary file (11.4 kB)
|
|
src/serve/__pycache__/gradio_block_arena_vision.cpython-310.pyc
DELETED
Binary file (9.37 kB)
|
|
src/serve/__pycache__/gradio_block_arena_vision_named.cpython-310.pyc
DELETED
Binary file (11.5 kB)
|
|
src/serve/__pycache__/gradio_web_server.cpython-310.pyc
DELETED
Binary file (20.7 kB)
|
|
src/serve/__pycache__/remote_logger.cpython-310.pyc
DELETED
Binary file (2.08 kB)
|
|
src/serve/gradio_web_server.py
CHANGED
@@ -440,7 +440,7 @@ def bot_response(
|
|
440 |
api_endpoint_info[model_name] if model_name in api_endpoint_info else None
|
441 |
)
|
442 |
images = conv.get_images()
|
443 |
-
logger.info(f"model_name: {model_name}; model_api_dict: {model_api_dict}; msg: {conv.messages}")
|
444 |
if model_api_dict is None:
|
445 |
if model_name == "llava-original":
|
446 |
from src.model.model_llava import inference_by_prompt_and_images
|
|
|
440 |
api_endpoint_info[model_name] if model_name in api_endpoint_info else None
|
441 |
)
|
442 |
images = conv.get_images()
|
443 |
+
logger.info(f"model_name: {model_name}; model_api_dict: {model_api_dict}; msg: {len(conv.messages)}")
|
444 |
if model_api_dict is None:
|
445 |
if model_name == "llava-original":
|
446 |
from src.model.model_llava import inference_by_prompt_and_images
|