Spaces:
Paused
Paused
Commit
·
8835226
1
Parent(s):
d311e85
Fixed version issue.
Browse files- requirements.txt +1 -1
- setup_project.py +0 -48
requirements.txt
CHANGED
@@ -3,5 +3,5 @@ uvicorn==0.27.0
|
|
3 |
pydantic==2.5.3
|
4 |
torch==2.5.0
|
5 |
transformers==4.36.2
|
6 |
-
litgpt
|
7 |
python-dotenv==1.0.0
|
|
|
3 |
pydantic==2.5.3
|
4 |
torch==2.5.0
|
5 |
transformers==4.36.2
|
6 |
+
litgpt==5.3.0
|
7 |
python-dotenv==1.0.0
|
setup_project.py
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
import os
|
2 |
-
import subprocess
|
3 |
-
import sys
|
4 |
-
import venv
|
5 |
-
from pathlib import Path
|
6 |
-
|
7 |
-
def setup_project():
|
8 |
-
# Ensure we're in the right directory
|
9 |
-
project_dir = Path(__file__).parent.absolute()
|
10 |
-
os.chdir(project_dir)
|
11 |
-
|
12 |
-
print("Setting up the project...")
|
13 |
-
|
14 |
-
# Create virtual environment if it doesn't exist
|
15 |
-
venv_dir = project_dir / "myenv"
|
16 |
-
if not venv_dir.exists():
|
17 |
-
print("Creating virtual environment...")
|
18 |
-
venv.create(venv_dir, with_pip=True)
|
19 |
-
|
20 |
-
# Determine the path to the Python executable in the virtual environment
|
21 |
-
if sys.platform == "win32":
|
22 |
-
python_executable = venv_dir / "Scripts" / "python.exe"
|
23 |
-
pip_executable = venv_dir / "Scripts" / "pip.exe"
|
24 |
-
else:
|
25 |
-
python_executable = venv_dir / "bin" / "python"
|
26 |
-
pip_executable = venv_dir / "bin" / "pip"
|
27 |
-
|
28 |
-
# Upgrade pip
|
29 |
-
print("Upgrading pip...")
|
30 |
-
subprocess.run([str(python_executable), "-m", "pip", "install", "--upgrade", "pip"])
|
31 |
-
|
32 |
-
# Install requirements
|
33 |
-
print("Installing requirements...")
|
34 |
-
requirements_file = project_dir / "requirements.txt"
|
35 |
-
if requirements_file.exists():
|
36 |
-
subprocess.run([str(pip_executable), "install", "-r", "requirements.txt"])
|
37 |
-
else:
|
38 |
-
print("Warning: requirements.txt not found!")
|
39 |
-
|
40 |
-
print("\nSetup completed successfully!")
|
41 |
-
print("\nTo activate the virtual environment:")
|
42 |
-
if sys.platform == "win32":
|
43 |
-
print(f" {venv_dir}\\Scripts\\activate")
|
44 |
-
else:
|
45 |
-
print(f" source {venv_dir}/bin/activate")
|
46 |
-
|
47 |
-
if __name__ == "__main__":
|
48 |
-
setup_project()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|