AItool commited on
Commit
01cb113
·
verified ·
1 Parent(s): 651b98b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -7,7 +7,6 @@ import gradio as gr
7
 
8
  FRAME1 = Path("demo/frame1.png")
9
  FRAME2 = Path("demo/frame2.png")
10
-
11
  TARGET_DIR = "/home/user/app/output/"
12
  PALETTE_PNG = Path(TARGET_DIR) / "palette.png"
13
  OUTPUT_GIF = Path(TARGET_DIR) / "output.gif"
@@ -41,8 +40,15 @@ def interpolate_image(img_a_path: str, img_b_path: str) -> str:
41
  ], check=True)
42
 
43
  return str(OUTPUT_GIF)
 
 
 
 
 
 
 
44
 
45
- with gr.Blocks(title="RIFE Interpolation") as demo:
46
  with gr.Tab("Demo"):
47
  gr.Markdown("### Demo: Preloaded images")
48
  input_imageA = gr.Image(type="filepath", value=str(FRAME1), label="Image A")
 
7
 
8
  FRAME1 = Path("demo/frame1.png")
9
  FRAME2 = Path("demo/frame2.png")
 
10
  TARGET_DIR = "/home/user/app/output/"
11
  PALETTE_PNG = Path(TARGET_DIR) / "palette.png"
12
  OUTPUT_GIF = Path(TARGET_DIR) / "output.gif"
 
40
  ], check=True)
41
 
42
  return str(OUTPUT_GIF)
43
+
44
+ # helper to read the Markdown file
45
+ def load_description(path):
46
+ with open(path, "r", encoding="utf-8") as f:
47
+ return f.read()
48
+
49
+ description_text = load_description("TITLE.md")
50
 
51
+ with gr.Blocks(title="RIFE Image Interpolation") as demo:
52
  with gr.Tab("Demo"):
53
  gr.Markdown("### Demo: Preloaded images")
54
  input_imageA = gr.Image(type="filepath", value=str(FRAME1), label="Image A")