Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -115,7 +115,8 @@ class WaifuDiffusionInterrogator:
|
|
| 115 |
tags = dict(full_tags[full_tags['category'] != 9][['name', 'confidence']].values)
|
| 116 |
self.cache[imgByteArr] = (ratings, tags)
|
| 117 |
if len(self.cache) > 25:
|
| 118 |
-
self.cache
|
|
|
|
| 119 |
|
| 120 |
return ratings, tags
|
| 121 |
|
|
|
|
| 115 |
tags = dict(full_tags[full_tags['category'] != 9][['name', 'confidence']].values)
|
| 116 |
self.cache[imgByteArr] = (ratings, tags)
|
| 117 |
if len(self.cache) > 25:
|
| 118 |
+
k = next(iter(self.cache))
|
| 119 |
+
v = self.cache.pop(k)
|
| 120 |
|
| 121 |
return ratings, tags
|
| 122 |
|