Spaces:
Runtime error
Runtime error
Commit
·
4629ff1
1
Parent(s):
0a6eee4
remove python slim
Browse files- Dockerfile +6 -1
- Web_app/app.py +1 -5
Dockerfile
CHANGED
@@ -29,6 +29,11 @@ COPY Web_app/requirements.txt ./requirements.txt
|
|
29 |
RUN pip install --upgrade pip
|
30 |
RUN pip install --no-cache-dir -r requirements.txt
|
31 |
|
|
|
|
|
|
|
|
|
|
|
32 |
# Explicitly install OpenAI Whisper
|
33 |
RUN pip install openai-whisper==20231117
|
34 |
RUN python -c "import whisper; print('Whisper installed successfully')"
|
@@ -37,7 +42,7 @@ RUN python -c "import whisper; print('Whisper installed successfully')"
|
|
37 |
COPY Web_app .
|
38 |
|
39 |
# Expose the port for Hugging Face
|
40 |
-
EXPOSE
|
41 |
|
42 |
# Command to run the app
|
43 |
CMD ["python", "app.py"]
|
|
|
29 |
RUN pip install --upgrade pip
|
30 |
RUN pip install --no-cache-dir -r requirements.txt
|
31 |
|
32 |
+
# After installing requirements
|
33 |
+
RUN pip uninstall -y torch torchvision && \
|
34 |
+
pip install --no-cache-dir torch==2.6.0 torchvision==0.21.0
|
35 |
+
|
36 |
+
|
37 |
# Explicitly install OpenAI Whisper
|
38 |
RUN pip install openai-whisper==20231117
|
39 |
RUN python -c "import whisper; print('Whisper installed successfully')"
|
|
|
42 |
COPY Web_app .
|
43 |
|
44 |
# Expose the port for Hugging Face
|
45 |
+
EXPOSE 5000
|
46 |
|
47 |
# Command to run the app
|
48 |
CMD ["python", "app.py"]
|
Web_app/app.py
CHANGED
@@ -661,12 +661,8 @@ def visualize_csv(file_path):
|
|
661 |
except Exception as e:
|
662 |
return f"An error occurred while processing the file: {str(e)}", 500
|
663 |
|
664 |
-
# if __name__ == '__main__':
|
665 |
-
# port = int(os.environ.get("PORT", 5000))
|
666 |
-
# app.run(host='0.0.0.0', port=port, debug=True)
|
667 |
if __name__ == '__main__':
|
668 |
-
port = int(os.environ.get("PORT",
|
669 |
app.run(host='0.0.0.0', port=port, debug=True)
|
670 |
|
671 |
|
672 |
-
|
|
|
661 |
except Exception as e:
|
662 |
return f"An error occurred while processing the file: {str(e)}", 500
|
663 |
|
|
|
|
|
|
|
664 |
if __name__ == '__main__':
|
665 |
+
port = int(os.environ.get("PORT", 5000))
|
666 |
app.run(host='0.0.0.0', port=port, debug=True)
|
667 |
|
668 |
|
|