diff --git a/gradio/networking.py b/gradio/networking.py index 05439e355b..6aa5c78c4b 100644 --- a/gradio/networking.py +++ b/gradio/networking.py @@ -130,7 +130,7 @@ def main(): @app.route("/static/", methods=["GET"]) def static_resource(path): - if app.interface.share: + if app.interface.share or os.getenv("GRADIO_TEST_MODE"): return redirect(GRADIO_STATIC_ROOT + path) else: return send_file(os.path.join(STATIC_PATH_LIB, path)) diff --git a/test/test_demos.py b/test/test_demos.py index dbf80f0590..7b809f49c7 100644 --- a/test/test_demos.py +++ b/test/test_demos.py @@ -11,6 +11,7 @@ import random import os current_dir = os.getcwd() +os.environ["GRADIO_TEST_MODE"] = "1" LOCAL_HOST = "http://localhost:{}" GOLDEN_PATH = "test/golden/{}/{}.png"