Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
strategy_embedding
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
strategy_embedding
Commits
65c2f293
Commit
65c2f293
authored
Sep 14, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save result
parent
3bd1ac93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
diary_cover_similarity.py
src/diary_cover_similarity.py
+4
-0
cache.py
src/utils/cache.py
+6
-0
No files found.
src/diary_cover_similarity.py
View file @
65c2f293
...
...
@@ -9,6 +9,7 @@ import numpy as np
from
utils.es
import
es_query
from
utils.images
import
face_to_vec
,
url_to_ndarray
from
utils.cache
import
redis_client3
def
save_diary_image_info
(
save_file
,
face_to_vec_f
):
...
...
@@ -211,6 +212,9 @@ def main():
key
=
random
.
choice
(
list
(
res_dict
.
keys
()))
print
(
res_dict
[
key
])
redis_key
=
"doris:diary:face_similary"
redis_client3
.
hmset
(
redis_key
,
res_dict
)
if
__name__
==
"__main__"
:
begin_time
=
time
.
time
()
...
...
src/utils/cache.py
0 → 100644
View file @
65c2f293
import
redis
redis_client
=
redis
.
StrictRedis
.
from_url
(
"redis://:ReDis!GmTx*0aN6@172.16.40.133:6379"
)
redis_client2
=
redis
.
StrictRedis
.
from_url
(
"redis://:ReDis!GmTx*0aN9@172.16.40.173:6379"
)
redis_client3
=
redis
.
StrictRedis
.
from_url
(
"redis://:ReDis!GmTx*0aN12@172.16.40.164:6379"
)
redis_client4
=
redis
.
StrictRedis
.
from_url
(
"redis://:XfkMCCdWDIU
%
ls$h@172.16.50.145:6379"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment