KevinQHLin commited on
Commit
bb6012f
·
verified ·
1 Parent(s): 43b5ffc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -26,6 +26,10 @@ import os
26
  import numpy as np
27
  from huggingface_hub import hf_hub_download, list_repo_files
28
 
 
 
 
 
29
  # Define constants
30
  DESCRIPTION = "[ShowUI Demo](https://huggingface.co/showlab/ShowUI-2B)"
31
  _SYSTEM = "Based on the screenshot of the page, I give a text description and you give its corresponding location. The coordinate represents a clickable location [x, y] for an element, which is a relative coordinate on the screenshot, scaled from 0 to 1."
 
26
  import numpy as np
27
  from huggingface_hub import hf_hub_download, list_repo_files
28
 
29
+ # flash attention
30
+ import subprocess
31
+ subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
32
+
33
  # Define constants
34
  DESCRIPTION = "[ShowUI Demo](https://huggingface.co/showlab/ShowUI-2B)"
35
  _SYSTEM = "Based on the screenshot of the page, I give a text description and you give its corresponding location. The coordinate represents a clickable location [x, y] for an element, which is a relative coordinate on the screenshot, scaled from 0 to 1."