Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,6 +16,7 @@ load_dotenv(verbose=True)
|
|
| 16 |
|
| 17 |
#sessuid = ""
|
| 18 |
#state = gr.State({"loginuser": ""})
|
|
|
|
| 19 |
|
| 20 |
# Initialize Qdrant and Cohere clients
|
| 21 |
client = QdrantClient(url=os.environ.get("QDRANT_URL"), api_key=os.environ.get("QDRANT_API_KEY"))
|
|
@@ -47,6 +48,9 @@ def list_private_models(profile: gr.OAuthProfile | None, oauth_token: gr.OAuthTo
|
|
| 47 |
userinfo = f"名前: {profile.name}さん\nID: {profile.username}\nプロファイル: {profile.profile}"
|
| 48 |
state.value["loginuser"] = userinfo
|
| 49 |
state.value["picture"] = profile.picture
|
|
|
|
|
|
|
|
|
|
| 50 |
print("pic:",state.value["picture"],profile.picture)
|
| 51 |
print("login-user:",state.value["loginuser"],userinfo)
|
| 52 |
|
|
@@ -235,8 +239,8 @@ with gr.Blocks(css="footer {visibility: hidden;} .custom-image {width: 64px; hei
|
|
| 235 |
gr.Markdown("📧 ベクターDBに保存されている知識ベースのインベントリを使用して知識共有します。")
|
| 236 |
|
| 237 |
|
| 238 |
-
with gr.Sidebar(open=False):
|
| 239 |
-
gr.Image(value="
|
| 240 |
gr.HTML("""
|
| 241 |
<!DOCTYPE html>
|
| 242 |
<html lang="ja">
|
|
|
|
| 16 |
|
| 17 |
#sessuid = ""
|
| 18 |
#state = gr.State({"loginuser": ""})
|
| 19 |
+
avatar = "https://www.ryhintl.com/images/ryhlogo/ryhlogo.png"
|
| 20 |
|
| 21 |
# Initialize Qdrant and Cohere clients
|
| 22 |
client = QdrantClient(url=os.environ.get("QDRANT_URL"), api_key=os.environ.get("QDRANT_API_KEY"))
|
|
|
|
| 48 |
userinfo = f"名前: {profile.name}さん\nID: {profile.username}\nプロファイル: {profile.profile}"
|
| 49 |
state.value["loginuser"] = userinfo
|
| 50 |
state.value["picture"] = profile.picture
|
| 51 |
+
|
| 52 |
+
global avatar
|
| 53 |
+
avatar = profile.picture
|
| 54 |
print("pic:",state.value["picture"],profile.picture)
|
| 55 |
print("login-user:",state.value["loginuser"],userinfo)
|
| 56 |
|
|
|
|
| 239 |
gr.Markdown("📧 ベクターDBに保存されている知識ベースのインベントリを使用して知識共有します。")
|
| 240 |
|
| 241 |
|
| 242 |
+
with gr.Sidebar(open=False,avatar):
|
| 243 |
+
gr.Image(value="{avatar}, elem_classes=["custom-image"])
|
| 244 |
gr.HTML("""
|
| 245 |
<!DOCTYPE html>
|
| 246 |
<html lang="ja">
|