Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ from threading import Thread
|
|
| 4 |
import re
|
| 5 |
import time
|
| 6 |
import torch
|
| 7 |
-
import spaces
|
| 8 |
#import subprocess
|
| 9 |
#subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
| 10 |
|
|
@@ -16,7 +16,7 @@ model = AutoModelForVision2Seq.from_pretrained("HuggingFaceTB/SmolVLM2-500M-Inst
|
|
| 16 |
torch_dtype=torch.bfloat16).to("cuda:0")
|
| 17 |
|
| 18 |
|
| 19 |
-
|
| 20 |
def model_inference(
|
| 21 |
input_dict, history, max_tokens
|
| 22 |
):
|
|
|
|
| 4 |
import re
|
| 5 |
import time
|
| 6 |
import torch
|
| 7 |
+
#import spaces
|
| 8 |
#import subprocess
|
| 9 |
#subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
| 10 |
|
|
|
|
| 16 |
torch_dtype=torch.bfloat16).to("cuda:0")
|
| 17 |
|
| 18 |
|
| 19 |
+
#@spaces.GPU
|
| 20 |
def model_inference(
|
| 21 |
input_dict, history, max_tokens
|
| 22 |
):
|