vonjack commited on
Commit
d5483e8
1 Parent(s): ae15592

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -0
README.md CHANGED
@@ -46,6 +46,33 @@ GGUFs:
46
  - BakLLaVA-1: https://huggingface.co/mys/ggml_bakllava-1
47
 
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  Example:
50
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6396e4f81dade26da03cdb73/lg7aMEeLhZVTHvFalOS40.png)
51
 
 
46
  - BakLLaVA-1: https://huggingface.co/mys/ggml_bakllava-1
47
 
48
 
49
+ Test code:
50
+ ```python
51
+ from llava.mm_utils import get_model_name_from_path
52
+ from llava.eval.run_llava import eval_model
53
+
54
+ model_path = "vonjack/Hermes-2-Pro-BakLLaVA-Mistral-7B"
55
+
56
+ prompt = "What's the content of the image?"
57
+ image_file = "https://www.ilankelman.org/stopsigns/australia.jpg"
58
+
59
+ args = type('Args', (), {
60
+ "model_path": model_path,
61
+ "model_base": None,
62
+ "model_name": get_model_name_from_path(model_path),
63
+ "query": prompt,
64
+ "conv_mode": None,
65
+ "image_file": image_file,
66
+ "sep": ",",
67
+ "temperature": 0,
68
+ "top_p": None,
69
+ "num_beams": 1,
70
+ "max_new_tokens": 512
71
+ })()
72
+
73
+ eval_model(args)
74
+ ```
75
+
76
  Example:
77
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6396e4f81dade26da03cdb73/lg7aMEeLhZVTHvFalOS40.png)
78