Update bootstrap.py
Browse files- bootstrap.py +7 -0
bootstrap.py
CHANGED
@@ -42,6 +42,13 @@ app_code = app_code.replace(
|
|
42 |
" if 'Video' in task:\n return interactive_infer_video(model, audio, image, task, *args, **kwargs)\n else:\n return interactive_infer_image(model, audio, image, task, *args, **kwargs)\n else:\n # Run without autocast on CPU\n if 'Video' in task:\n return interactive_infer_video(model, audio, image, task, *args, **kwargs)\n else:\n return interactive_infer_image(model, audio, image, task, *args, **kwargs)"
|
43 |
)
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
with open(app_patched_path, "w") as f:
|
46 |
f.write(app_code)
|
47 |
|
|
|
42 |
" if 'Video' in task:\n return interactive_infer_video(model, audio, image, task, *args, **kwargs)\n else:\n return interactive_infer_image(model, audio, image, task, *args, **kwargs)\n else:\n # Run without autocast on CPU\n if 'Video' in task:\n return interactive_infer_video(model, audio, image, task, *args, **kwargs)\n else:\n return interactive_infer_image(model, audio, image, task, *args, **kwargs)"
|
43 |
)
|
44 |
|
45 |
+
# Also fix example paths if they include demo/seem prefix
|
46 |
+
if "demo/seem/examples/" in app_code:
|
47 |
+
app_code = app_code.replace(
|
48 |
+
"\"demo/seem/examples/",
|
49 |
+
"\"examples/"
|
50 |
+
)
|
51 |
+
|
52 |
with open(app_patched_path, "w") as f:
|
53 |
f.write(app_code)
|
54 |
|