Spaces:
Running on Zero
Running on Zero
Commit ·
6476bad
1
Parent(s): 2d20595
[Admin maintenance] Support new ZeroGPU hardware (#6)
Browse files- [Admin maintenance] Support new ZeroGPU hardware (c949f9d8647ea9f8a13a1f5e05114925e0efb329)
- README.md +2 -1
- app.py +1 -3
- requirements.txt +5 -4
README.md
CHANGED
|
@@ -8,6 +8,7 @@ sdk_version: 5.38.2
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
| 11 |
+
python_version: "3.10"
|
| 12 |
---
|
| 13 |
|
| 14 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import AutoProcessor, AutoModelForImageTextToText, TextIteratorStreamer
|
| 3 |
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 |
|
| 11 |
from io import BytesIO
|
| 12 |
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import gradio as gr
|
| 3 |
from transformers import AutoProcessor, AutoModelForImageTextToText, TextIteratorStreamer
|
| 4 |
from threading import Thread
|
| 5 |
import re
|
| 6 |
import time
|
| 7 |
import torch
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
from io import BytesIO
|
| 10 |
|
requirements.txt
CHANGED
|
@@ -1,10 +1,11 @@
|
|
| 1 |
-
torch
|
| 2 |
-
torchvision
|
| 3 |
-
|
| 4 |
accelerate
|
| 5 |
huggingface_hub
|
| 6 |
gradio
|
| 7 |
transformers
|
| 8 |
spaces
|
| 9 |
num2words
|
| 10 |
-
decord
|
|
|
|
|
|
| 1 |
+
torch==2.8.0
|
| 2 |
+
torchvision==0.23.0
|
| 3 |
+
av
|
| 4 |
accelerate
|
| 5 |
huggingface_hub
|
| 6 |
gradio
|
| 7 |
transformers
|
| 8 |
spaces
|
| 9 |
num2words
|
| 10 |
+
decord
|
| 11 |
+
https://huggingface.co/datasets/multimodalart/zerogpu-blackwell-wheels/resolve/main/wheels/pt28-cu128-cp310/flash_attn-2.8.3-cp310-cp310-linux_x86_64.whl
|