ai.vietqt commited on
Commit
a8a1db2
·
2 Parent(s): baae5a2 f8a1c15
Files changed (3) hide show
  1. README.md +1 -2
  2. app.py +5 -1
  3. setup.sh +7 -2
README.md CHANGED
@@ -3,8 +3,7 @@ title: ABC- Automatic Background Change
3
  emoji: ⚡
4
  colorFrom: yellow
5
  colorTo: gray
6
- sdk: gradio
7
- sdk_version: 3.0.19
8
  app_file: app.py
9
  pinned: false
10
  ---
 
3
  emoji: ⚡
4
  colorFrom: yellow
5
  colorTo: gray
6
+ sdk: streamlit
 
7
  app_file: app.py
8
  pinned: false
9
  ---
app.py CHANGED
@@ -14,7 +14,7 @@ def load_image(image_file):
14
  def streamlit_app():
15
  detection_model_path = "weight_files/clothes_detection_model.pt"
16
  background_model_path = "weight_files/model.h5"
17
- # save_path = ""
18
  image_file = None
19
  st.title("""WELCOME TO MY APP""")
20
  st.subheader("""FOR BACKGROUND REMOVAL AND CHANGE!""")
@@ -65,7 +65,11 @@ def streamlit_app():
65
  st.write('\n')
66
  st.write('\n')
67
 
 
68
  file_name = save_path.split("/")[-1].split(".")[-2] +"_from_abc" + ".png"
 
 
 
69
  if st.download_button(
70
  label="Download postprocessing image",
71
  data=file,
 
14
  def streamlit_app():
15
  detection_model_path = "weight_files/clothes_detection_model.pt"
16
  background_model_path = "weight_files/model.h5"
17
+ save_path = ""
18
  image_file = None
19
  st.title("""WELCOME TO MY APP""")
20
  st.subheader("""FOR BACKGROUND REMOVAL AND CHANGE!""")
 
65
  st.write('\n')
66
  st.write('\n')
67
 
68
+ <<<<<<< HEAD
69
  file_name = save_path.split("/")[-1].split(".")[-2] +"_from_abc" + ".png"
70
+ =======
71
+ file_name = save_path.split("\\")[-1].split(".")[-2] +"_from_abc" + ".png"
72
+ >>>>>>> f8a1c15accda33623cbebb00386656c29388f4b6
73
  if st.download_button(
74
  label="Download postprocessing image",
75
  data=file,
setup.sh CHANGED
@@ -1,8 +1,13 @@
1
  mkdir -p ~/.streamlit/
 
 
 
 
 
 
2
  echo "\
3
  [server]\n\
4
  headless = true\n\
 
5
  port = $PORT\n\
6
- enableCORS = false\n\
7
- \n\
8
  " > ~/.streamlit/config.toml
 
1
  mkdir -p ~/.streamlit/
2
+
3
+ echo "\
4
+ [general]\n\
5
+ email = \"[email protected]\"\n\
6
+ " > ~/.streamlit/credentials.toml
7
+
8
  echo "\
9
  [server]\n\
10
  headless = true\n\
11
+ enableCORS=false\n\
12
  port = $PORT\n\
 
 
13
  " > ~/.streamlit/config.toml