Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,9 @@ 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")
|
|
|
|
| 5 |
|
| 6 |
# Function to execute the anime upscaler command
|
| 7 |
def execute_upscaler(input_video_path, output_path, save_intermediate, async_mode):
|
| 8 |
+
if input_video_path is None:
|
| 9 |
+
raise ValueError("No video file provided.")
|
| 10 |
+
|
| 11 |
# Determine the path to the model file in the same directory
|
| 12 |
script_directory = os.path.dirname(os.path.realpath(__file__))
|
| 13 |
model_path = os.path.join(script_directory, "RealESRGAN_x4plus_anime_6B.pth")
|