prithivMLmods commited on
Commit
7b7c3b2
·
verified ·
1 Parent(s): 81ef0c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -8
app.py CHANGED
@@ -20,7 +20,7 @@ import fitz # PyMuPDF
20
  import gradio as gr
21
  import requests
22
  import torch
23
- import subprocess
24
  from huggingface_hub import snapshot_download
25
  from PIL import Image, ImageDraw, ImageFont
26
  from transformers import AutoModelForCausalLM, AutoProcessor, VisionEncoderDecoderModel
@@ -34,13 +34,6 @@ from albumentations.pytorch import ToTensorV2
34
  from timm.data.constants import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
35
 
36
 
37
- # Attempt to install flash-attn
38
- try:
39
- subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, check=True, shell=True)
40
- except subprocess.CalledProcessError as e:
41
- print(f"Error installing flash-attn: {e}")
42
- print("Continuing without flash-attn.")
43
-
44
 
45
  # --- Constants & Global State ---
46
  MIN_PIXELS = 3136
 
20
  import gradio as gr
21
  import requests
22
  import torch
23
+ #import subprocess
24
  from huggingface_hub import snapshot_download
25
  from PIL import Image, ImageDraw, ImageFont
26
  from transformers import AutoModelForCausalLM, AutoProcessor, VisionEncoderDecoderModel
 
34
  from timm.data.constants import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
35
 
36
 
 
 
 
 
 
 
 
37
 
38
  # --- Constants & Global State ---
39
  MIN_PIXELS = 3136