Spaces:
Sleeping
Sleeping
Yarik
commited on
Commit
·
3ddf776
1
Parent(s):
b176a42
Add application file
Browse files- .gitignore +2 -0
- Dockerfile +32 -0
- requirements.txt +9 -0
.gitignore
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.env
|
| 2 |
+
__pycache__
|
Dockerfile
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10.14
|
| 2 |
+
|
| 3 |
+
# Install dependencies
|
| 4 |
+
RUN apt-get update && apt-get install -y libsndfile1 espeak-ng
|
| 5 |
+
|
| 6 |
+
# Set the working directory
|
| 7 |
+
WORKDIR /app
|
| 8 |
+
|
| 9 |
+
# Create cache directory with write permissions
|
| 10 |
+
RUN mkdir -p /app/.cache && chmod 777 /app/.cache
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
# Устанавливаем зависимости
|
| 14 |
+
COPY requirements.txt /app/requirements.txt
|
| 15 |
+
RUN apt-get update && apt-get install -y git ffmpeg && \
|
| 16 |
+
pip install --no-cache-dir -r /app/requirements.txt
|
| 17 |
+
|
| 18 |
+
# Copy the application code
|
| 19 |
+
COPY . .
|
| 20 |
+
|
| 21 |
+
# Set environment variable for Hugging Face cache directory
|
| 22 |
+
ENV HF_HOME=/app/.cache
|
| 23 |
+
|
| 24 |
+
# Create cache directory and set permissions
|
| 25 |
+
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
# Expose the port
|
| 29 |
+
EXPOSE 7860
|
| 30 |
+
|
| 31 |
+
# Run the application
|
| 32 |
+
CMD ["python", "app.py"]
|
requirements.txt
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
numpy>=1.19.5
|
| 2 |
+
torch>=1.9
|
| 3 |
+
ukrainian-word-stress
|
| 4 |
+
git+https://github.com/Theodotus1243/ukrainian-accentor-transformer.git
|
| 5 |
+
fastapi
|
| 6 |
+
pydantic
|
| 7 |
+
uvicorn
|
| 8 |
+
pydub
|
| 9 |
+
passlib
|