Spaces:
Running
on
Zero
Running
on
Zero
MohamedRashad
commited on
Commit
·
9312c4b
1
Parent(s):
22d3db7
Refactor model ID handling in app.py and update requirements.txt
Browse files- app.py +2 -0
- requirements.txt +1 -2
app.py
CHANGED
@@ -3,6 +3,8 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStream
|
|
3 |
import torch
|
4 |
import gradio as gr
|
5 |
from threading import Thread
|
|
|
|
|
6 |
|
7 |
models_available = [
|
8 |
"MohamedRashad/Arabic-Orpo-Llama-3-8B-Instruct",
|
|
|
3 |
import torch
|
4 |
import gradio as gr
|
5 |
from threading import Thread
|
6 |
+
import subprocess
|
7 |
+
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
8 |
|
9 |
models_available = [
|
10 |
"MohamedRashad/Arabic-Orpo-Llama-3-8B-Instruct",
|
requirements.txt
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
transformers
|
2 |
torch
|
3 |
accelerate
|
4 |
-
spaces
|
5 |
-
flash-attn
|
|
|
1 |
transformers
|
2 |
torch
|
3 |
accelerate
|
4 |
+
spaces
|
|