mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-21 01:01:05 +08:00
Fixes the favicon_path
working error (#8573)
* fixes error * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
ed82a6237e
commit
56af40f5e3
5
.changeset/red-badgers-sip.md
Normal file
5
.changeset/red-badgers-sip.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
fix:Fixes the `favicon_path` working error
|
@ -7,6 +7,7 @@ import asyncio
|
||||
import contextlib
|
||||
import math
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from importlib.resources import files
|
||||
@ -1287,6 +1288,12 @@ def mount_gradio_app(
|
||||
app = gr.mount_gradio_app(app, io, path="/gradio")
|
||||
# Then run `uvicorn run:app` from the terminal and navigate to http://localhost:8000/gradio.
|
||||
"""
|
||||
if favicon_path is not None and path != "/":
|
||||
warnings.warn(
|
||||
"The 'favicon_path' parameter is set but will be ignored because 'path' is not '/'. "
|
||||
"Please add the favicon directly to your FastAPI app."
|
||||
)
|
||||
|
||||
blocks.dev_mode = False
|
||||
blocks.max_file_size = utils._parse_file_size(max_file_size)
|
||||
blocks.config = blocks.get_config_file()
|
||||
|
Loading…
Reference in New Issue
Block a user