Skip to content

Instantly share code, notes, and snippets.

@edavidaja
Created December 17, 2024 18:49
Show Gist options
  • Save edavidaja/6f6aa7136781de7a329482816b5deaa2 to your computer and use it in GitHub Desktop.
Save edavidaja/6f6aa7136781de7a329482816b5deaa2 to your computer and use it in GitHub Desktop.
gradio
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