sandeshrajx commited on
Commit
aea5436
·
verified ·
1 Parent(s): 2d49f29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -20
app.py CHANGED
@@ -10,26 +10,6 @@ from transformers import T5ForConditionalGeneration, T5Tokenizer
10
  import os
11
 
12
  print ("starting the app.")
13
- def install_apex():
14
- # Install Apex in editable mode from the specified GitHub repository
15
- # cmd = [
16
- # 'pip', 'install', '-v','--no-cache-dir', '--no-build-isolation',
17
- # '--config-settings', 'build-option=--cpp_ext', '--config-settings',
18
- # 'build-option=--cuda_ext', 'git+https://github.com/sandeshrajbhandari/apex.git#egg=apex'
19
- # ]
20
- cmd = '!pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" git+https://github.com/sandeshrajbhandari/apex.git#egg=apex'
21
- subprocess.run(cmd, shell=True)
22
-
23
- try:
24
-
25
- import apex
26
- except ModuleNotFoundError:
27
- print("Apex not found, installing...")
28
- install_apex()
29
- # Try to import Apex again after installation
30
- import apex
31
-
32
- subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
33
 
34
  def download_t5_model(model_id, save_directory):
35
  # Modelin tokenizer'ını ve modeli indir
 
10
  import os
11
 
12
  print ("starting the app.")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  def download_t5_model(model_id, save_directory):
15
  # Modelin tokenizer'ını ve modeli indir