Spaces:
Running
Running
Update app.py
Browse files
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(
|
|
|
|
|
|
|
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),
|