AItool commited on
Commit
2e72af1
·
verified ·
1 Parent(s): ae47f31

added def load_description

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -3,7 +3,6 @@ import subprocess
3
  from pathlib import Path
4
  from PIL import Image
5
  import streamlit as st
6
-
7
  import urllib.request
8
  from PIL import Image,ImageFile
9
  import streamlit as st
@@ -31,6 +30,9 @@ OUTPUT_GIF = TARGET_DIR / "output.gif"
31
  os.makedirs(TARGET_DIR, exist_ok=True)
32
 
33
  # ---- FUNCTION ----
 
 
 
34
  def interpolate_image(img_a_path: str, img_b_path: str) -> str:
35
  subprocess.run([
36
  "python3", "inference_img.py",
 
3
  from pathlib import Path
4
  from PIL import Image
5
  import streamlit as st
 
6
  import urllib.request
7
  from PIL import Image,ImageFile
8
  import streamlit as st
 
30
  os.makedirs(TARGET_DIR, exist_ok=True)
31
 
32
  # ---- FUNCTION ----
33
+ def load_description(path: str) -> str:
34
+ return Path(path).read_text(encoding="utf-8")
35
+
36
  def interpolate_image(img_a_path: str, img_b_path: str) -> str:
37
  subprocess.run([
38
  "python3", "inference_img.py",