peterkros commited on
Commit
7b1849c
·
verified ·
1 Parent(s): af4a02a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -1,7 +1,11 @@
1
  import gradio as gr
 
2
 
3
  # Function to execute the anime upscaler command
4
- def execute_upscaler(model_path, input_path, output_path, save_intermediate, async_mode):
 
 
 
5
  # Build the command
6
  command = [
7
  "python3",
@@ -28,7 +32,6 @@ def execute_upscaler(model_path, input_path, output_path, save_intermediate, asy
28
  iface = gr.Interface(
29
  fn=execute_upscaler,
30
  inputs=[
31
- gr.File("file", label="Model Path (.pth)"),
32
  gr.File("file", label="Input Video"),
33
  gr.File("file", label="Output Path"),
34
  gr.Checkbox("Save Intermediate", default=False),
 
1
  import gradio as gr
2
+ import os
3
 
4
  # Function to execute the anime upscaler command
5
+ def execute_upscaler(input_path, output_path, save_intermediate, async_mode):
6
+ # Determine the path to the model file in the same directory
7
+ model_path = os.path.join(os.path.dirname(__file__), "RealESRGAN_x4plus_anime_6B.pth")
8
+
9
  # Build the command
10
  command = [
11
  "python3",
 
32
  iface = gr.Interface(
33
  fn=execute_upscaler,
34
  inputs=[
 
35
  gr.File("file", label="Input Video"),
36
  gr.File("file", label="Output Path"),
37
  gr.Checkbox("Save Intermediate", default=False),