Spaces:
Runtime error
Runtime error
ryanzhangfan
commited on
Commit
•
cb44d0b
1
Parent(s):
c61b764
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,11 @@
|
|
1 |
import subprocess
|
2 |
subprocess.run("pip install gradio==4.44.0", shell=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
from PIL import Image
|
5 |
import gradio as gr
|
@@ -21,12 +27,6 @@ from emu3.mllm.processing_emu3 import Emu3Processor
|
|
21 |
import io
|
22 |
import base64
|
23 |
|
24 |
-
subprocess.run(
|
25 |
-
"pip3 install flash-attn --no-build-isolation",
|
26 |
-
env={"FLASH_ATTENTION_SKIP_CUDA_BUILD": "TRUE"},
|
27 |
-
shell=True,
|
28 |
-
)
|
29 |
-
|
30 |
def image2str(image):
|
31 |
buf = io.BytesIO()
|
32 |
image.save(buf, format="PNG")
|
|
|
1 |
import subprocess
|
2 |
subprocess.run("pip install gradio==4.44.0", shell=True)
|
3 |
+
subprocess.run(
|
4 |
+
"pip install flash-attn --no-build-isolation",
|
5 |
+
env={"FLASH_ATTENTION_SKIP_CUDA_BUILD": "TRUE"},
|
6 |
+
shell=True,
|
7 |
+
)
|
8 |
+
|
9 |
|
10 |
from PIL import Image
|
11 |
import gradio as gr
|
|
|
27 |
import io
|
28 |
import base64
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
def image2str(image):
|
31 |
buf = io.BytesIO()
|
32 |
image.save(buf, format="PNG")
|