Spaces:
Runtime error
Runtime error
Add application file
Browse files- Dockerfile +10 -10
- main.py +1 -1
Dockerfile
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
FROM python:3.11
|
2 |
-
WORKDIR /
|
3 |
|
4 |
# Copy the requirements file and install dependencies
|
5 |
COPY ./requirements.txt /code/requirements.txt
|
6 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
7 |
-
COPY ./s2smodels.py /
|
8 |
-
COPY ./macros.py /
|
9 |
-
COPY ./utils
|
10 |
-
COPY ./modules
|
11 |
-
COPY ./models/
|
12 |
-
COPY ./data/
|
13 |
-
COPY ./prompts
|
14 |
-
COPY ./customs
|
15 |
-
COPY ./main.py /
|
16 |
|
17 |
# Specify the command to run the application
|
18 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
|
|
|
1 |
FROM python:3.11
|
2 |
+
WORKDIR /
|
3 |
|
4 |
# Copy the requirements file and install dependencies
|
5 |
COPY ./requirements.txt /code/requirements.txt
|
6 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
7 |
+
COPY ./s2smodels.py /
|
8 |
+
COPY ./macros.py /
|
9 |
+
COPY ./utils /
|
10 |
+
COPY ./modules /
|
11 |
+
COPY ./models /
|
12 |
+
COPY ./data /
|
13 |
+
COPY ./prompts /
|
14 |
+
COPY ./customs /
|
15 |
+
COPY ./main.py /
|
16 |
|
17 |
# Specify the command to run the application
|
18 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
|
main.py
CHANGED
@@ -221,7 +221,7 @@ def speech_to_speech_translation_en_ar(audio_url):
|
|
221 |
|
222 |
@app.get("/get_ar_audio/")
|
223 |
async def get_ar_audio(audio_url):
|
224 |
-
|
225 |
session = Session()
|
226 |
# Get target audio from AudioGeneration
|
227 |
target_audio = session.query(AudioGeneration).order_by(AudioGeneration.id.desc()).first()
|
|
|
221 |
|
222 |
@app.get("/get_ar_audio/")
|
223 |
async def get_ar_audio(audio_url):
|
224 |
+
speech_to_speech_translation_en_ar(audio_url)
|
225 |
session = Session()
|
226 |
# Get target audio from AudioGeneration
|
227 |
target_audio = session.query(AudioGeneration).order_by(AudioGeneration.id.desc()).first()
|