Add application file
Browse files- app.py +11 -0
- setup_env.sh +15 -0
app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def greet(name):
|
| 4 |
+
return "Hello " + name + "!!"
|
| 5 |
+
|
| 6 |
+
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
+
demo.launch()
|
| 8 |
+
<<<<<<< HEAD
|
| 9 |
+
|
| 10 |
+
=======
|
| 11 |
+
>>>>>>> 5ca0ca7d00d636d41c4e7a43eb2d6a393c0281d3
|
setup_env.sh
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CUDA 12.1 toolkits must already be on PATH
|
| 2 |
+
python3.10 -m venv .venv && source .venv/bin/activate
|
| 3 |
+
pip install --upgrade pip wheel setuptools
|
| 4 |
+
|
| 5 |
+
# Torch with CUDA 12.1
|
| 6 |
+
pip install --extra-index-url https://download.pytorch.org/whl/cu121 \
|
| 7 |
+
torch==2.4.0+cu121 torchvision==0.19.0+cu121 torchaudio==2.4.0+cu121
|
| 8 |
+
|
| 9 |
+
# The rest
|
| 10 |
+
pip install transformers==4.44.2 tokenizers==0.19.1 datasets==2.21.0 \
|
| 11 |
+
flash-attn==2.6.3 --no-build-isolation \
|
| 12 |
+
bitsandbytes==0.43.3 peft==0.11.1 deepspeed==0.14.5 \
|
| 13 |
+
faiss-gpu==1.8.0.post1 pyarrow==17.0.0 pandas==2.2.2 \
|
| 14 |
+
gymnasium==0.29.1 stable-baselines3==2.3.2 \
|
| 15 |
+
wandb==0.17.9 scikit-learn==1.5.2
|