walidadebayo commited on
Commit
cece7d0
·
1 Parent(s): eb4231e

Update Docker configuration and clean up core.py: change port mapping, remove Streamlit references, and optimize imports

Browse files
Files changed (3) hide show
  1. docker-compose.yml +3 -2
  2. requirements.txt +0 -1
  3. src/core.py +3 -17
docker-compose.yml CHANGED
@@ -6,9 +6,10 @@ services:
6
  container_name: sthf-remove-photo-object
7
  restart: unless-stopped
8
  ports:
9
- - 41003:8501
10
  volumes:
11
  - .:/app
12
  environment:
13
  - TZ=Asia/Jakarta
14
- # command: streamlit run sdc.py
 
 
6
  container_name: sthf-remove-photo-object
7
  restart: unless-stopped
8
  ports:
9
+ - 41003:7860
10
  volumes:
11
  - .:/app
12
  environment:
13
  - TZ=Asia/Jakarta
14
+ - PORT=7860
15
+ command: python app.py
requirements.txt CHANGED
@@ -4,5 +4,4 @@ numpy
4
  opencv-python-headless
5
  pillow
6
  torch
7
- pandas
8
  scipy
 
4
  opencv-python-headless
5
  pillow
6
  torch
 
7
  scipy
src/core.py CHANGED
@@ -1,28 +1,14 @@
1
- import base64
2
- import json
3
  import os
4
- import re
5
  import time
6
- import uuid
7
- from io import BytesIO
8
- from pathlib import Path
9
- import cv2
10
-
11
- # For inpainting
12
 
 
13
  import numpy as np
14
- import pandas as pd
15
- import streamlit as st
16
- from PIL import Image
17
- from streamlit_drawable_canvas import st_canvas
18
-
19
 
20
  import argparse
21
  import io
22
  import multiprocessing
23
- from typing import Union
24
-
25
- import torch
26
 
27
  try:
28
  torch._C._jit_override_can_fuse_on_cpu(False)
 
 
 
1
  import os
 
2
  import time
3
+ from typing import Union
 
 
 
 
 
4
 
5
+ import cv2
6
  import numpy as np
7
+ import torch
 
 
 
 
8
 
9
  import argparse
10
  import io
11
  import multiprocessing
 
 
 
12
 
13
  try:
14
  torch._C._jit_override_can_fuse_on_cpu(False)