sandeshrajx
commited on
Commit
•
d42bc00
1
Parent(s):
d0e0b3d
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,19 @@ from transformers import T5ForConditionalGeneration, T5Tokenizer
|
|
10 |
import os
|
11 |
|
12 |
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
def download_t5_model(model_id, save_directory):
|
15 |
# Modelin tokenizer'ını ve modeli indir
|
16 |
model = T5ForConditionalGeneration.from_pretrained(model_id)
|
|
|
10 |
import os
|
11 |
|
12 |
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
13 |
+
install_options = [
|
14 |
+
"--disable-pip-version-check",
|
15 |
+
"--no-cache-dir",
|
16 |
+
"--no-build-isolation",
|
17 |
+
"--config-settings", "--build-option=--cpp_ext",
|
18 |
+
"--config-settings", "--build-option=--cuda_ext"
|
19 |
+
]
|
20 |
+
print("tseting")
|
21 |
+
subprocess.run(
|
22 |
+
["pip", "install", "-v"] + install_options + ["git+https://github.com/sandeshrajbhandari/apex.git#egg=apex"],
|
23 |
+
check=True,
|
24 |
+
capture_output=True
|
25 |
+
)
|
26 |
def download_t5_model(model_id, save_directory):
|
27 |
# Modelin tokenizer'ını ve modeli indir
|
28 |
model = T5ForConditionalGeneration.from_pretrained(model_id)
|