Skip to content

Commit

Permalink
add modelscope user cache
Browse files Browse the repository at this point in the history
  • Loading branch information
rayrayraykk committed Jan 22, 2024
1 parent 3df5ad9 commit 0e9814c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/game/app.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
from typing import List
import base64
import os
import yaml
import datetime
import threading
from collections import defaultdict
from typing import List

import agentscope

Expand Down Expand Up @@ -42,8 +43,6 @@ def check_uuid(uid):
is_init = False
MAX_NUM_DISPLAY_MSG = 20

import base64


# 图片本地路径转换为 base64 格式
def covert_image_to_base64(image_path):
Expand Down Expand Up @@ -126,6 +125,8 @@ def check_for_new_session(uid):
check_uuid(uid)
if uid not in glb_signed_user:
glb_signed_user.append(uid)
print("==========Signed User==========")
print(len(glb_signed_user), glb_signed_user)
game_thread = threading.Thread(target=start_game, args=(uid,))
game_thread.start()

Expand Down

0 comments on commit 0e9814c

Please sign in to comment.