Spaces:
Runtime error
Runtime error
fancyfeast
commited on
Commit
·
1825005
1
Parent(s):
5adadb0
Force transformers requirement version
Browse files- app.py +2 -0
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -7,6 +7,7 @@ from pathlib import Path
|
|
| 7 |
import torch
|
| 8 |
import torch.amp.autocast_mode
|
| 9 |
from PIL import Image
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
CLIP_PATH = "google/siglip-so400m-patch14-384"
|
|
@@ -14,6 +15,7 @@ VLM_PROMPT = "A descriptive caption for this image:\n"
|
|
| 14 |
MODEL_PATH = "meta-llama/Meta-Llama-3.1-8B"
|
| 15 |
CHECKPOINT_PATH = Path("h2vtfhad")
|
| 16 |
TITLE = "<h1><center>Foo</center></h1>"
|
|
|
|
| 17 |
|
| 18 |
|
| 19 |
class ImageAdapter(nn.Module):
|
|
|
|
| 7 |
import torch
|
| 8 |
import torch.amp.autocast_mode
|
| 9 |
from PIL import Image
|
| 10 |
+
import os
|
| 11 |
|
| 12 |
|
| 13 |
CLIP_PATH = "google/siglip-so400m-patch14-384"
|
|
|
|
| 15 |
MODEL_PATH = "meta-llama/Meta-Llama-3.1-8B"
|
| 16 |
CHECKPOINT_PATH = Path("h2vtfhad")
|
| 17 |
TITLE = "<h1><center>Foo</center></h1>"
|
| 18 |
+
HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
| 19 |
|
| 20 |
|
| 21 |
class ImageAdapter(nn.Module):
|
requirements.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
huggingface_hub==0.22.2
|
| 2 |
accelerate
|
| 3 |
torch
|
| 4 |
-
transformers
|
| 5 |
sentencepiece
|
|
|
|
| 1 |
huggingface_hub==0.22.2
|
| 2 |
accelerate
|
| 3 |
torch
|
| 4 |
+
transformers==4.43.3
|
| 5 |
sentencepiece
|