(hub_path: str)
| 15 | |
| 16 | |
| 17 | def get_model(hub_path: str) -> VLM: |
| 18 | if "instructblip" in hub_path: |
| 19 | return InstructBLIP(hub_path) |
| 20 | elif "llava" in hub_path: |
| 21 | return LLaVa(hub_path) |
| 22 | elif "gpt" in hub_path: |
| 23 | return GPT4V(hub_path) |
| 24 | elif "gemini" in hub_path: |
| 25 | return Gemini(hub_path) |
| 26 | elif "claude" in hub_path: |
| 27 | return Claude(hub_path) |
| 28 | else: |
| 29 | raise ValueError(f"Model {hub_path} not supported.") |
| 30 | |
| 31 | |
| 32 | def get_captioning_model(hub_path: str) -> VLM: |