Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,7 +36,7 @@ def hello(profile: gr.OAuthProfile | None) -> str:
|
|
| 36 |
# ^ expect a gr.OAuthProfile object as input to get the user's profile
|
| 37 |
# if the user is not logged in, profile will be None
|
| 38 |
if profile is None:
|
| 39 |
-
return "
|
| 40 |
return f"γγγγοΌ {profile.name}γγ"
|
| 41 |
|
| 42 |
|
|
@@ -46,7 +46,7 @@ def list_private_models(profile: gr.OAuthProfile | None, oauth_token: gr.OAuthTo
|
|
| 46 |
# if the user is not logged in, oauth_token will be None
|
| 47 |
gr.Textbox(oauth_token)
|
| 48 |
if oauth_token is None:
|
| 49 |
-
return "Please log in to list private models."
|
| 50 |
#models = [
|
| 51 |
#f"{model.id} ({'private' if model.private else 'public'})"
|
| 52 |
#for model in list_models(author=profile.username, token=oauth_token.token)
|
|
@@ -67,7 +67,7 @@ def process_eprag(prompt):
|
|
| 67 |
|
| 68 |
with gr.Blocks() as demo:
|
| 69 |
gr.Markdown(
|
| 70 |
-
"# Gradio OAuth Space"
|
| 71 |
#"\n\nThis Space is a demo for the **Sign in with Hugging Face** feature. "
|
| 72 |
#"Duplicate this Space to get started."
|
| 73 |
#"\n\nFor more details, check out:"
|
|
|
|
| 36 |
# ^ expect a gr.OAuthProfile object as input to get the user's profile
|
| 37 |
# if the user is not logged in, profile will be None
|
| 38 |
if profile is None:
|
| 39 |
+
return "βοΈ"
|
| 40 |
return f"γγγγοΌ {profile.name}γγ"
|
| 41 |
|
| 42 |
|
|
|
|
| 46 |
# if the user is not logged in, oauth_token will be None
|
| 47 |
gr.Textbox(oauth_token)
|
| 48 |
if oauth_token is None:
|
| 49 |
+
return "Please log in to list private models.", gr.update(visible=False), gr.update(visible=False)
|
| 50 |
#models = [
|
| 51 |
#f"{model.id} ({'private' if model.private else 'public'})"
|
| 52 |
#for model in list_models(author=profile.username, token=oauth_token.token)
|
|
|
|
| 67 |
|
| 68 |
with gr.Blocks() as demo:
|
| 69 |
gr.Markdown(
|
| 70 |
+
"# Gradio OAuth Space for Agentic RAG"
|
| 71 |
#"\n\nThis Space is a demo for the **Sign in with Hugging Face** feature. "
|
| 72 |
#"Duplicate this Space to get started."
|
| 73 |
#"\n\nFor more details, check out:"
|