zouhairk commited on
Commit
2b7f7fa
·
1 Parent(s): 3d2c274
Files changed (3) hide show
  1. Dockerfile +4 -2
  2. app.py +1 -2
  3. requirements.txt +4 -1
Dockerfile CHANGED
@@ -12,5 +12,7 @@ WORKDIR /app
12
  COPY --chown=user ./requirements.txt requirements.txt
13
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
 
15
- COPY --chown=user app.py /app
16
- CMD ["python", "app.py"]
 
 
 
12
  COPY --chown=user ./requirements.txt requirements.txt
13
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
 
15
+ COPY --chown=user . /app
16
+
17
+ EXPOSE 8000
18
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
app.py CHANGED
@@ -75,5 +75,4 @@ def text_to_speech():
75
 
76
  return jsonify({"audio_url": output_filename})
77
 
78
- if __name__ == "__main__":
79
- app.run(debug=True, host="0.0.0.0", port=7860)
 
75
 
76
  return jsonify({"audio_url": output_filename})
77
 
78
+
 
requirements.txt CHANGED
@@ -8,4 +8,7 @@ tiktoken
8
  blobfile
9
  protobuf
10
  sentencepiece
11
- torchaudio
 
 
 
 
8
  blobfile
9
  protobuf
10
  sentencepiece
11
+ torchaudio
12
+ fastapi==0.95.2
13
+ uvicorn==0.22.0
14
+