mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-23 11:39:17 +08:00
fix typing of launcher function (#10030)
* fix typing of launcher function * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
7b8f1e447a
commit
ba05a7cbb9
5
.changeset/large-words-happen.md
Normal file
5
.changeset/large-words-happen.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"gradio": minor
|
||||
---
|
||||
|
||||
feat:fix typing of launcher function
|
@ -35,7 +35,6 @@ from gradio import (
|
||||
networking,
|
||||
processing_utils,
|
||||
queueing,
|
||||
routes,
|
||||
strings,
|
||||
themes,
|
||||
utils,
|
||||
@ -70,6 +69,7 @@ from gradio.exceptions import (
|
||||
from gradio.helpers import create_tracker, skip, special_args
|
||||
from gradio.node_server import start_node_server
|
||||
from gradio.route_utils import API_PREFIX, MediaStream
|
||||
from gradio.routes import VERSION, App, Request
|
||||
from gradio.state_holder import SessionState, StateHolder
|
||||
from gradio.themes import Default as DefaultTheme
|
||||
from gradio.themes import ThemeClass as Theme
|
||||
@ -1507,7 +1507,7 @@ class Blocks(BlockContext, BlocksEvents, metaclass=BlocksMeta):
|
||||
block_fn: BlockFunction | int,
|
||||
processed_input: list[Any],
|
||||
iterator: AsyncIterator[Any] | None = None,
|
||||
requests: routes.Request | list[routes.Request] | None = None,
|
||||
requests: Request | list[Request] | None = None,
|
||||
event_id: str | None = None,
|
||||
event_data: EventData | None = None,
|
||||
in_event_listener: bool = False,
|
||||
@ -1932,7 +1932,7 @@ Received inputs:
|
||||
block_fn: BlockFunction | int,
|
||||
inputs: list[Any],
|
||||
state: SessionState | None = None,
|
||||
request: routes.Request | list[routes.Request] | None = None,
|
||||
request: Request | list[Request] | None = None,
|
||||
iterator: AsyncIterator | None = None,
|
||||
session_hash: str | None = None,
|
||||
event_id: str | None = None,
|
||||
@ -2106,7 +2106,7 @@ Received inputs:
|
||||
|
||||
def get_config_file(self) -> BlocksConfigDict:
|
||||
config: BlocksConfigDict = {
|
||||
"version": routes.VERSION,
|
||||
"version": VERSION,
|
||||
"api_prefix": API_PREFIX,
|
||||
"mode": self.mode,
|
||||
"app_id": self.app_id,
|
||||
@ -2172,7 +2172,7 @@ Received inputs:
|
||||
else:
|
||||
self.parent.children.extend(self.children)
|
||||
self.config = self.get_config_file()
|
||||
self.app = routes.App.create_app(self)
|
||||
self.app = App.create_app(self)
|
||||
self.progress_tracking = any(
|
||||
block_fn.tracks_progress for block_fn in self.fns.values()
|
||||
)
|
||||
@ -2225,7 +2225,7 @@ Received inputs:
|
||||
default_concurrency_limit=default_concurrency_limit,
|
||||
)
|
||||
self.config = self.get_config_file()
|
||||
self.app = routes.App.create_app(self)
|
||||
self.app = App.create_app(self)
|
||||
return self
|
||||
|
||||
def validate_queue_settings(self):
|
||||
@ -2282,7 +2282,7 @@ Received inputs:
|
||||
node_port: int | None = None,
|
||||
ssr_mode: bool | None = None,
|
||||
_frontend: bool = True,
|
||||
) -> tuple[routes.App, str, str]:
|
||||
) -> tuple[App, str, str]:
|
||||
"""
|
||||
Launches a simple web server that serves the demo. Can also be used to create a
|
||||
public link used by anyone to access the demo from their browser by setting share=True.
|
||||
|
Loading…
Reference in New Issue
Block a user