From 74f22d57a153e087d81a8937cc9c918ff7d3eeb9 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Thu, 21 Nov 2024 15:25:34 -0800 Subject: [PATCH] Fix Starlette templating deprecation warning (#10011) * fix deprc * add changeset --------- Co-authored-by: gradio-pr-bot --- .changeset/silly-bananas-run.md | 5 +++++ gradio/routes.py | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/silly-bananas-run.md diff --git a/.changeset/silly-bananas-run.md b/.changeset/silly-bananas-run.md new file mode 100644 index 0000000000..dcfe96a5c2 --- /dev/null +++ b/.changeset/silly-bananas-run.md @@ -0,0 +1,5 @@ +--- +"gradio": patch +--- + +fix:Fix Starlette templating deprecation warning diff --git a/gradio/routes.py b/gradio/routes.py index 66272e646b..f23481a580 100644 --- a/gradio/routes.py +++ b/gradio/routes.py @@ -570,9 +570,9 @@ class App(FastAPI): ) gradio_api_info = api_info(request) return templates.TemplateResponse( - template, - { - "request": request, + request=request, + name=template, + context={ "config": config, "gradio_api_info": gradio_api_info, },