Skip to content

Add Gradio authentication support via command line arguments - #258

Open
kldzj wants to merge 1 commit into
nari-labs:mainfrom
kldzj:gradio-auth
Open

Add Gradio authentication support via command line arguments#258
kldzj wants to merge 1 commit into
nari-labs:mainfrom
kldzj:gradio-auth

Conversation

@kldzj

@kldzj kldzj commented Jul 13, 2025

Copy link
Copy Markdown

Summary

This pull request introduces an authentication layer to the Gradio web interface. Users can now secure the application by setting a username and password, which can be provided either through command-line arguments or environment variables.

Changes

  • CLI Arguments Added: Introduced --username and --password arguments in app.py to receive authentication credentials.
  • Environment Variable Support: The application now reads credentials from GRADIO_USERNAME and GRADIO_PASSWORD environment variables.

Additional Notes

  • Usage: To enable authentication, run the app with both arguments (e.g., python app.py --username admin --password your_password). Alternatively one can set the specified environment variables to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant