Spaces:
Runtime error
Runtime error
[Admin maintenance] Support new ZeroGPU hardware
#2
by multimodalart HF Staff - opened
- README.md +2 -1
- app.py +14 -4
- requirements.txt +4 -4
README.md
CHANGED
|
@@ -4,7 +4,8 @@ emoji: 🪄
|
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
|
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
|
|
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 5.49.1
|
| 8 |
+
python_version: "3.12"
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
license: apache-2.0
|
app.py
CHANGED
|
@@ -11,10 +11,21 @@ import shlex
|
|
| 11 |
import string
|
| 12 |
import subprocess
|
| 13 |
import threading
|
| 14 |
-
import spaces
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
import cv2
|
| 20 |
import gradio as gr
|
|
@@ -201,7 +212,6 @@ class ChatBotUI(object):
|
|
| 201 |
self.chatbot = gr.Chatbot(
|
| 202 |
height=600,
|
| 203 |
value=[],
|
| 204 |
-
bubble_full_width=False,
|
| 205 |
show_copy_button=True,
|
| 206 |
container=False,
|
| 207 |
placeholder='<strong>Chat Box</strong>')
|
|
|
|
| 11 |
import string
|
| 12 |
import subprocess
|
| 13 |
import threading
|
|
|
|
| 14 |
|
| 15 |
+
# Python 3.12 removed `importlib.find_loader`; scepter still calls it. Shim it
|
| 16 |
+
# back via `importlib.util.find_spec` so the scepter import chain succeeds.
|
| 17 |
+
import importlib
|
| 18 |
+
if not hasattr(importlib, "find_loader"):
|
| 19 |
+
import importlib.util
|
| 20 |
+
def _find_loader(name, path=None):
|
| 21 |
+
try:
|
| 22 |
+
spec = importlib.util.find_spec(name)
|
| 23 |
+
except (ImportError, ValueError):
|
| 24 |
+
return None
|
| 25 |
+
return spec.loader if spec is not None else None
|
| 26 |
+
importlib.find_loader = _find_loader
|
| 27 |
+
|
| 28 |
+
import spaces
|
| 29 |
|
| 30 |
import cv2
|
| 31 |
import gradio as gr
|
|
|
|
| 212 |
self.chatbot = gr.Chatbot(
|
| 213 |
height=600,
|
| 214 |
value=[],
|
|
|
|
| 215 |
show_copy_button=True,
|
| 216 |
container=False,
|
| 217 |
placeholder='<strong>Chat Box</strong>')
|
requirements.txt
CHANGED
|
@@ -2,7 +2,7 @@ huggingface_hub
|
|
| 2 |
diffusers
|
| 3 |
transformers
|
| 4 |
gradio_imageslider
|
| 5 |
-
torch==2.
|
| 6 |
-
torchvision
|
| 7 |
-
|
| 8 |
-
git+https://github.com/modelscope/scepter.git@v1.3.0_dev#egg=scepter
|
|
|
|
| 2 |
diffusers
|
| 3 |
transformers
|
| 4 |
gradio_imageslider
|
| 5 |
+
torch==2.10.0
|
| 6 |
+
torchvision==0.25.0
|
| 7 |
+
https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.1/flash_attn-2.8.1+cu12torch2.10cxx11abiTRUE-cp312-cp312-linux_x86_64.whl
|
| 8 |
+
git+https://github.com/modelscope/scepter.git@v1.3.0_dev#egg=scepter
|