Add pipeline_tag and library_name to metadata
#4
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-4.0
|
|
|
|
|
|
|
| 3 |
tags:
|
| 4 |
- AutoGaze
|
| 5 |
- NVILA
|
|
@@ -25,11 +27,16 @@ from transformers import AutoModel, AutoProcessor
|
|
| 25 |
|
| 26 |
model_path = "nvidia/NVILA-8B-HD-Video"
|
| 27 |
video_path = "https://huggingface.co/datasets/bfshi/HLVid/resolve/main/example/clip_av_video_5_001.mp4"
|
| 28 |
-
prompt = "Question: What does the white text on the green road sign say?
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
Please answer directly with the letter of the correct answer."
|
| 34 |
|
| 35 |
# ----- Video processing args -----
|
|
@@ -73,7 +80,9 @@ model.eval()
|
|
| 73 |
|
| 74 |
# Run inference
|
| 75 |
video_token = processor.tokenizer.video_token
|
| 76 |
-
inputs = processor(text=f"{video_token}
|
|
|
|
|
|
|
| 77 |
inputs = {k: v.to(model.device) if isinstance(v, torch.Tensor) else v for k, v in inputs.items()}
|
| 78 |
|
| 79 |
outputs = model.generate(**inputs)
|
|
@@ -173,4 +182,4 @@ The model is tested on NVIDIA A100 GPU.
|
|
| 173 |
|
| 174 |
|
| 175 |
### Ethical Considerations:
|
| 176 |
-
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse. Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-4.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: video-text-to-text
|
| 5 |
tags:
|
| 6 |
- AutoGaze
|
| 7 |
- NVILA
|
|
|
|
| 27 |
|
| 28 |
model_path = "nvidia/NVILA-8B-HD-Video"
|
| 29 |
video_path = "https://huggingface.co/datasets/bfshi/HLVid/resolve/main/example/clip_av_video_5_001.mp4"
|
| 30 |
+
prompt = "Question: What does the white text on the green road sign say?
|
| 31 |
+
\
|
| 32 |
+
A. Hampden St
|
| 33 |
+
\
|
| 34 |
+
B. Hampden Ave
|
| 35 |
+
\
|
| 36 |
+
C. HampdenBlvd
|
| 37 |
+
\
|
| 38 |
+
D. Hampden Rd
|
| 39 |
+
\
|
| 40 |
Please answer directly with the letter of the correct answer."
|
| 41 |
|
| 42 |
# ----- Video processing args -----
|
|
|
|
| 80 |
|
| 81 |
# Run inference
|
| 82 |
video_token = processor.tokenizer.video_token
|
| 83 |
+
inputs = processor(text=f"{video_token}
|
| 84 |
+
|
| 85 |
+
{prompt}", videos=video_path, return_tensors="pt")
|
| 86 |
inputs = {k: v.to(model.device) if isinstance(v, torch.Tensor) else v for k, v in inputs.items()}
|
| 87 |
|
| 88 |
outputs = model.generate(**inputs)
|
|
|
|
| 182 |
|
| 183 |
|
| 184 |
### Ethical Considerations:
|
| 185 |
+
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse. Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
|