Vela commited on
Commit
48e17a6
·
1 Parent(s): 6eeddda

docker file modified

Browse files
Dockerfile CHANGED
@@ -1,10 +1,10 @@
1
  FROM python:3.9
2
 
3
- ENV PATH="/home/user/.local/bin:$PATH"
4
-
5
  WORKDIR /code
6
-
7
  COPY . /code
 
 
 
8
 
9
  RUN pip install --upgrade pip
10
  RUN pip install --no-cache-dir -r requirements.txt
 
1
  FROM python:3.9
2
 
 
 
3
  WORKDIR /code
 
4
  COPY . /code
5
+ ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/hub
6
+
7
+
8
 
9
  RUN pip install --upgrade pip
10
  RUN pip install --no-cache-dir -r requirements.txt
src/api/main.py CHANGED
@@ -15,10 +15,6 @@ def home():
15
  def display_prediction(message : str = "Hello World"):
16
  try:
17
  dimention = logistic_regression.get_label(message)
18
- # dimention = message
19
  return {"message" : dimention}
20
  except Exception as e:
21
- return f"Unable to fetch the data {e}"
22
-
23
- # x = display_prediction()
24
- # print(type(x))
 
15
  def display_prediction(message : str = "Hello World"):
16
  try:
17
  dimention = logistic_regression.get_label(message)
 
18
  return {"message" : dimention}
19
  except Exception as e:
20
+ return f"Unable to fetch the data {e}"
 
 
 
src/modules/logistic_regression.py CHANGED
@@ -10,7 +10,7 @@ src_directory = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..",
10
  sys.path.append(src_directory)
11
  from data import sample_data
12
 
13
- file_path = r"src\data\sms_process_data_main.xlsx"
14
  df = sample_data.get_data_frame(file_path)
15
 
16
  def get_label(message):
 
10
  sys.path.append(src_directory)
11
  from data import sample_data
12
 
13
+ file_path = r"src/data/sms_process_data_main.xlsx"
14
  df = sample_data.get_data_frame(file_path)
15
 
16
  def get_label(message):