mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
[Feature]: To be compatible with the latest version of MiniGPT-4 (#539)
* [Feature]: To be compatible with the latest version of MiniGPT-4 * [Feature]: User try and except Co-authored-by: Fengzhe Zhou <zfz-960727@163.com> * [Fix]: Fix lint --------- Co-authored-by: bensenliu <bensenliu@tencent.com> Co-authored-by: Fengzhe Zhou <zfz-960727@163.com>
This commit is contained in:
parent
f25a980043
commit
6e31520128
@ -27,7 +27,13 @@ def load_package():
|
||||
current_folder_path = os.path.dirname(current_file_path)
|
||||
|
||||
sys.path.append(os.path.join(current_folder_path, 'MiniGPT-4')) # noqa
|
||||
from minigpt4.models.mini_gpt4 import MiniGPT4
|
||||
|
||||
try:
|
||||
# the latest version of MiniGPT4
|
||||
from minigpt4.models.minigpt4 import MiniGPT4
|
||||
except ImportError:
|
||||
# the old version of MiniGPT4
|
||||
from minigpt4.models.mini_gpt4 import MiniGPT4
|
||||
|
||||
sys.path.pop(-1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user