test
Browse files
app.py
CHANGED
|
@@ -3,10 +3,14 @@ import numpy as np
|
|
| 3 |
import random
|
| 4 |
from diffusers import DiffusionPipeline
|
| 5 |
import torch
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
processor = LlavaNextVideoProcessor.from_pretrained("llava-hf/LLaVA-NeXT-Video-7B-hf")
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 12 |
|
|
|
|
| 3 |
import random
|
| 4 |
from diffusers import DiffusionPipeline
|
| 5 |
import torch
|
| 6 |
+
# Use a pipeline as a high-level helper
|
| 7 |
+
from transformers import pipeline
|
|
|
|
| 8 |
|
| 9 |
+
messages = [
|
| 10 |
+
{"role": "user", "content": "Who are you?"},
|
| 11 |
+
]
|
| 12 |
+
pipe = pipeline("text-generation", model="lmms-lab/LLaVA-NeXT-Video-32B-Qwen")
|
| 13 |
+
pipe(messages)
|
| 14 |
|
| 15 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 16 |
|