nguyen-brat commited on
Commit
35a62a4
·
1 Parent(s): 934538a
Files changed (2) hide show
  1. Dockerfile +2 -2
  2. app.py +3 -2
Dockerfile CHANGED
@@ -58,8 +58,8 @@ WORKDIR $HOME/app/text-remove/lama
58
  RUN curl -LJO https://huggingface.co/smartywu/big-lama/resolve/main/big-lama.zip
59
  RUN unzip big-lama.zip
60
 
61
- RUN chmod 777 $HOME/app/text-remove/target_test
62
- RUN chmod 777 $HOME/app/text-remove/test_folder
63
 
64
  # RUN useradd -m -u 1000 user
65
  # USER user
 
58
  RUN curl -LJO https://huggingface.co/smartywu/big-lama/resolve/main/big-lama.zip
59
  RUN unzip big-lama.zip
60
 
61
+ #RUN chmod 777 $HOME/app/text-remove/target_test
62
+ #RUN chmod 777 $HOME/app/text-remove/test_folder
63
 
64
  # RUN useradd -m -u 1000 user
65
  # USER user
app.py CHANGED
@@ -87,7 +87,7 @@ def create_temp_structure():
87
  return temp_dir, test_folder, target_folder
88
 
89
  st.title("Text Detection App")
90
- file_name = " || ".join(os.listdir('.'))
91
  st.write(file_name)
92
  uploaded_file = st.file_uploader("Choose an image file", type=["jpg", "jpeg", "png"])
93
 
@@ -97,7 +97,8 @@ if uploaded_file is not None:
97
  # Create a temporary directory for processing
98
 
99
  # Save the uploaded file temporarily
100
- _, input_path, output_path = create_temp_structure()
 
101
  # os.makedirs(input_path, exist_ok=True)
102
  # os.makedirs(osp(output_path, "result"), exist_ok=True)
103
  # os.makedirs(osp(output_path, "mask"), exist_ok=True)
 
87
  return temp_dir, test_folder, target_folder
88
 
89
  st.title("Text Detection App")
90
+ file_name = " || ".join(os.listdir('craft_pytorch'))
91
  st.write(file_name)
92
  uploaded_file = st.file_uploader("Choose an image file", type=["jpg", "jpeg", "png"])
93
 
 
97
  # Create a temporary directory for processing
98
 
99
  # Save the uploaded file temporarily
100
+ temp_dir, input_path, output_path = create_temp_structure()
101
+ st.write(f"Temp dir: {temp_dir}")
102
  # os.makedirs(input_path, exist_ok=True)
103
  # os.makedirs(osp(output_path, "result"), exist_ok=True)
104
  # os.makedirs(osp(output_path, "mask"), exist_ok=True)