Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files- app.py +1 -0
- requirements.txt +2 -1
app.py
CHANGED
@@ -24,6 +24,7 @@ moondream = AutoModelForCausalLM.from_pretrained(
|
|
24 |
#attn_implementation="flash_attention_2"
|
25 |
).to(device)
|
26 |
moondream.eval()
|
|
|
27 |
|
28 |
#@spaces.GPU
|
29 |
def answer_question(img, prompt):
|
|
|
24 |
#attn_implementation="flash_attention_2"
|
25 |
).to(device)
|
26 |
moondream.eval()
|
27 |
+
moondream.to_bettertransformer()
|
28 |
|
29 |
#@spaces.GPU
|
30 |
def answer_question(img, prompt):
|
requirements.txt
CHANGED
@@ -4,4 +4,5 @@ einops>=0.8.0
|
|
4 |
accelerate>=0.32.1
|
5 |
numpy<2
|
6 |
torch==2.4.0
|
7 |
-
torchvision
|
|
|
|
4 |
accelerate>=0.32.1
|
5 |
numpy<2
|
6 |
torch==2.4.0
|
7 |
+
torchvision
|
8 |
+
optimum
|