mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
Exclude typer
from the requirements list for Wasm env and fix gradio.cli
not to be imported (#7823)
* Exclude `typer` from the requirements list for Wasm env and fix `gradio.cli` not to be imported * add changeset * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
parent
bf5110a26b
commit
e0a8b7fa2c
5
.changeset/silly-spies-cross.md
Normal file
5
.changeset/silly-spies-cross.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
feat:Exclude `typer` from the requirements list for Wasm env and fix `gradio.cli` not to be imported
|
@ -7,7 +7,6 @@ import gradio.templates
|
||||
from gradio import components, layouts, themes
|
||||
from gradio.blocks import Blocks
|
||||
from gradio.chat_interface import ChatInterface
|
||||
from gradio.cli import deploy
|
||||
from gradio.components import (
|
||||
HTML,
|
||||
JSON,
|
||||
@ -99,5 +98,9 @@ from gradio.templates import (
|
||||
)
|
||||
from gradio.themes import Base as Theme
|
||||
from gradio.utils import NO_RELOAD, get_package_version, set_static_paths
|
||||
from gradio.wasm_utils import IS_WASM
|
||||
|
||||
if not IS_WASM:
|
||||
from gradio.cli import deploy
|
||||
|
||||
__version__ = get_package_version()
|
||||
|
@ -680,6 +680,11 @@ class Blocks(BlockContext, BlocksEvents, metaclass=BlocksMeta):
|
||||
|
||||
@property
|
||||
def _is_running_in_reload_thread(self):
|
||||
if wasm_utils.IS_WASM:
|
||||
# Wasm (Pyodide) doesn't support threading,
|
||||
# so the return value is always False.
|
||||
return False
|
||||
|
||||
from gradio.cli.commands.reload import reload_thread
|
||||
|
||||
return getattr(reload_thread, "running_reload", False)
|
||||
|
@ -21,6 +21,6 @@ pyyaml>=5.0,<7.0
|
||||
semantic_version~=2.0
|
||||
typing_extensions~=4.0
|
||||
uvicorn>=0.14.0; sys.platform != 'emscripten'
|
||||
typer[all]>=0.9,<1.0
|
||||
typer[all]>=0.9,<1.0; sys.platform != 'emscripten'
|
||||
tomlkit==0.12.0
|
||||
ruff>=0.2.2; sys.platform != 'emscripten'
|
||||
|
Loading…
Reference in New Issue
Block a user