Gradio Share + Headless CLI Start-up

Incorporated code excerpts from the Gradio Interface Documentation and the file webui.py [Line 122] in the repository https://github.com/lllyasviel/Fooocus. While I played a central role in its creation, the code received a cursory review. Additional assistance was provided by ChatGPT.

Implemented the capability to pass --share, --port, and --listen arguments to the gradio.Interface.launch() function, cascading down to the gradio app module located at /facefusion/uis/core.py.

Enhanced the headless option with the functionality to prompt users for any absent paths. This guards against initiating the app in headless mode without path specification, fostering a learning environment that embraces errors. This addition accommodates diverse user behaviors.

Revised help texts in /facefusion/wording.py accordingly. Established novel global variables for housing file paths.

NOTE: Shaped the writing tone of the extended description under the guidance of ChatGPT, deriving from a description initially crafted by a human. See respective Pull Request for initial human description.
This commit is contained in:
Feanix-Fyre 2023-08-23 10:05:08 -04:00 committed by GitHub
parent a40cd90864
commit 39133c5333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,7 +61,6 @@ def parse_args() -> None:
program.add_argument('-v', '--version', action = 'version', version = metadata.get('name') + ' ' + metadata.get('version')) program.add_argument('-v', '--version', action = 'version', version = metadata.get('name') + ' ' + metadata.get('version'))
args = program.parse_args() args = program.parse_args()
facefusion.globals.source_path = args.source_path facefusion.globals.source_path = args.source_path