Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import tempfile
|
|
4 |
import shutil
|
5 |
|
6 |
# Function to execute the anime upscaler command
|
7 |
-
def execute_upscaler(
|
8 |
# Determine the path to the model file in the same directory
|
9 |
script_directory = os.path.dirname(os.path.realpath(__file__))
|
10 |
model_path = os.path.join(script_directory, "RealESRGAN_x4plus_anime_6B.pth")
|
@@ -13,10 +13,6 @@ def execute_upscaler(input_video, output_path, save_intermediate, async_mode):
|
|
13 |
temp_dir = tempfile.mkdtemp()
|
14 |
|
15 |
try:
|
16 |
-
# Save the uploaded video to the temporary directory
|
17 |
-
input_video_path = os.path.join(temp_dir, "input_video.mp4")
|
18 |
-
input_video.save(input_video_path)
|
19 |
-
|
20 |
# Build the command
|
21 |
command = [
|
22 |
"python3",
|
|
|
4 |
import shutil
|
5 |
|
6 |
# Function to execute the anime upscaler command
|
7 |
+
def execute_upscaler(input_video_path, output_path, save_intermediate, async_mode):
|
8 |
# Determine the path to the model file in the same directory
|
9 |
script_directory = os.path.dirname(os.path.realpath(__file__))
|
10 |
model_path = os.path.join(script_directory, "RealESRGAN_x4plus_anime_6B.pth")
|
|
|
13 |
temp_dir = tempfile.mkdtemp()
|
14 |
|
15 |
try:
|
|
|
|
|
|
|
|
|
16 |
# Build the command
|
17 |
command = [
|
18 |
"python3",
|