Spaces:
Paused
Paused
Download DeepFakeAI/uis/components/execution_queue_count.py from imseldrith/myDeepFakeAI: direct link, hf CLI and curl.
- Browser
- Download file 925 Bytes
-
https://huggingface.co/spaces/imseldrith/myDeepFakeAI/resolve/refs%2Fpr%2F1/DeepFakeAI/uis/components/execution_queue_count.py
- Command line
-
hf download hf://spaces/imseldrith/myDeepFakeAI@refs/pr/1/DeepFakeAI/uis/components/execution_queue_count.py
-
curl -L -o execution_queue_count.py https://huggingface.co/spaces/imseldrith/myDeepFakeAI/resolve/refs%2Fpr%2F1/DeepFakeAI/uis/components/execution_queue_count.py
925 Bytes
| from typing import Optional | |
| import gradio | |
| import DeepFakeAI.globals | |
| import DeepFakeAI.choices | |
| from DeepFakeAI import wording | |
| EXECUTION_QUEUE_COUNT_SLIDER : Optional[gradio.Slider] = None | |
| def render() -> None: | |
| global EXECUTION_QUEUE_COUNT_SLIDER | |
| EXECUTION_QUEUE_COUNT_SLIDER = gradio.Slider( | |
| label = wording.get('execution_queue_count_slider_label'), | |
| value = DeepFakeAI.globals.execution_queue_count, | |
| step = DeepFakeAI.choices.execution_queue_count_range[1] - DeepFakeAI.choices.execution_queue_count_range[0], | |
| minimum = DeepFakeAI.choices.execution_queue_count_range[0], | |
| maximum = DeepFakeAI.choices.execution_queue_count_range[-1] | |
| ) | |
| def listen() -> None: | |
| EXECUTION_QUEUE_COUNT_SLIDER.change(update_execution_queue_count, inputs = EXECUTION_QUEUE_COUNT_SLIDER) | |
| def update_execution_queue_count(execution_queue_count : int = 1) -> None: | |
| DeepFakeAI.globals.execution_queue_count = execution_queue_count | |