Created
December 17, 2024 18:49
-
-
Save edavidaja/6f6aa7136781de7a329482816b5deaa2 to your computer and use it in GitHub Desktop.
gradio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gradio as gr | |
def get_user_info(text, request: gr.Request): | |
user_info = request.headers["RStudio-Connect-Credentials"] | |
return { | |
"user_info": user_info | |
} | |
demo = gr.Interface(get_user_info, "text", "json") | |
demo.launch() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment