AshDavid12 commited on
Commit
d056195
·
1 Parent(s): aad72ce

trying to build simple trasncribe - testing

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. infer.py +6 -1
Dockerfile CHANGED
@@ -2,7 +2,7 @@
2
  from python:3.11.1-buster
3
 
4
  # Set the working directory
5
- WORKDIR /
6
 
7
  # Create a writable cache directory for Hugging Face
8
  RUN mkdir -p /app/hf_cache && chmod -R 777 /app/hf_cache
 
2
  from python:3.11.1-buster
3
 
4
  # Set the working directory
5
+ WORKDIR /app
6
 
7
  # Create a writable cache directory for Hugging Face
8
  RUN mkdir -p /app/hf_cache && chmod -R 777 /app/hf_cache
infer.py CHANGED
@@ -7,9 +7,14 @@ import os
7
  import logging
8
  from datetime import datetime
9
 
 
 
 
 
10
  # Set up logging
 
11
  logging.basicConfig(
12
- filename="transcription_log.log",
13
  format="%(asctime)s - %(levelname)s - %(message)s",
14
  level=logging.INFO
15
  )
 
7
  import logging
8
  from datetime import datetime
9
 
10
+ # Ensure the log directory exists
11
+ log_directory = "/app/logs"
12
+ os.makedirs(log_directory, exist_ok=True)
13
+
14
  # Set up logging
15
+ log_file_path = os.path.join(log_directory, "transcription_log.log")
16
  logging.basicConfig(
17
+ filename=log_file_path,
18
  format="%(asctime)s - %(levelname)s - %(message)s",
19
  level=logging.INFO
20
  )