Spaces:
Build error
Build error
fixed imports
Browse files
app.py
CHANGED
|
@@ -40,6 +40,8 @@ embeddings="intfloat/e5-base-v2"
|
|
| 40 |
vectorstore = FAISS.load_local("./index", embeddings, allow_dangerous_deserialization=True)
|
| 41 |
|
| 42 |
#%% Include a rate limiter
|
|
|
|
|
|
|
| 43 |
class RateLimiter:
|
| 44 |
def __init__(self, max_requests=10, window_minutes=60):
|
| 45 |
self.max_requests = max_requests
|
|
|
|
| 40 |
vectorstore = FAISS.load_local("./index", embeddings, allow_dangerous_deserialization=True)
|
| 41 |
|
| 42 |
#%% Include a rate limiter
|
| 43 |
+
from collections import defaultdict
|
| 44 |
+
from datetime import datetime, timedelta
|
| 45 |
class RateLimiter:
|
| 46 |
def __init__(self, max_requests=10, window_minutes=60):
|
| 47 |
self.max_requests = max_requests
|