Spaces:
Runtime error
Runtime error
fix path bug
Browse files- hugging_face/app.py +4 -4
hugging_face/app.py
CHANGED
|
@@ -232,18 +232,18 @@ def process_video(input_video, draw_box, bg_enhancement):
|
|
| 232 |
return save_restore_path
|
| 233 |
|
| 234 |
# Downloading necessary models and sample videos.
|
| 235 |
-
sample_videos_dir = os.path.join("test_sample/")
|
| 236 |
os.makedirs(sample_videos_dir, exist_ok=True)
|
| 237 |
download_url_to_file("https://github.com/jnjaby/KEEP/releases/download/media/real_1.mp4", os.path.join(sample_videos_dir, "real_1.mp4"))
|
| 238 |
download_url_to_file("https://github.com/jnjaby/KEEP/releases/download/media/real_2.mp4", os.path.join(sample_videos_dir, "real_2.mp4"))
|
| 239 |
download_url_to_file("https://github.com/jnjaby/KEEP/releases/download/media/real_3.mp4", os.path.join(sample_videos_dir, "real_3.mp4"))
|
| 240 |
download_url_to_file("https://github.com/jnjaby/KEEP/releases/download/media/real_4.mp4", os.path.join(sample_videos_dir, "real_4.mp4"))
|
| 241 |
|
| 242 |
-
model_dir = os.path.join("
|
| 243 |
_ = load_file_from_url(url='https://github.com/jnjaby/KEEP/releases/download/v1.0.0/KEEP-b76feb75.pth', model_dir=model_dir, progress=True, file_name=None)
|
| 244 |
|
| 245 |
-
realesrgan_dir = os.path.join("
|
| 246 |
-
_ = load_file_from_url(url='https://github.com/jnjaby/KEEP/releases/download/v1.0.0/RealESRGAN_x2plus.pth', model_dir=
|
| 247 |
|
| 248 |
# Launching the Gradio interface.
|
| 249 |
demo = gr.Interface(
|
|
|
|
| 232 |
return save_restore_path
|
| 233 |
|
| 234 |
# Downloading necessary models and sample videos.
|
| 235 |
+
sample_videos_dir = os.path.join("/home/user/app/hugging_face/", "test_sample/")
|
| 236 |
os.makedirs(sample_videos_dir, exist_ok=True)
|
| 237 |
download_url_to_file("https://github.com/jnjaby/KEEP/releases/download/media/real_1.mp4", os.path.join(sample_videos_dir, "real_1.mp4"))
|
| 238 |
download_url_to_file("https://github.com/jnjaby/KEEP/releases/download/media/real_2.mp4", os.path.join(sample_videos_dir, "real_2.mp4"))
|
| 239 |
download_url_to_file("https://github.com/jnjaby/KEEP/releases/download/media/real_3.mp4", os.path.join(sample_videos_dir, "real_3.mp4"))
|
| 240 |
download_url_to_file("https://github.com/jnjaby/KEEP/releases/download/media/real_4.mp4", os.path.join(sample_videos_dir, "real_4.mp4"))
|
| 241 |
|
| 242 |
+
model_dir = os.path.join("/home/user/app/", "weights/KEEP")
|
| 243 |
_ = load_file_from_url(url='https://github.com/jnjaby/KEEP/releases/download/v1.0.0/KEEP-b76feb75.pth', model_dir=model_dir, progress=True, file_name=None)
|
| 244 |
|
| 245 |
+
realesrgan_dir = os.path.join("/home/user/app/", "weights/realesrgan")
|
| 246 |
+
_ = load_file_from_url(url='https://github.com/jnjaby/KEEP/releases/download/v1.0.0/RealESRGAN_x2plus.pth', model_dir=realesrgan_dir, progress=True, file_name=None)
|
| 247 |
|
| 248 |
# Launching the Gradio interface.
|
| 249 |
demo = gr.Interface(
|