Spaces:
Paused
Paused
remove pytz and change timestamp logic
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import os, subprocess, time, pytz
|
| 2 |
-
from datetime import datetime
|
| 3 |
from fastapi import FastAPI
|
| 4 |
|
| 5 |
from langchain_community.vectorstores import Chroma
|
|
@@ -70,9 +70,9 @@ def rag_with_reranking(query : str):
|
|
| 70 |
def search_text(query):
|
| 71 |
"""Searches for similar texts."""
|
| 72 |
|
| 73 |
-
|
| 74 |
-
now =
|
| 75 |
-
print(
|
| 76 |
print(f"Searching for: {query}")
|
| 77 |
|
| 78 |
start = time.time()
|
|
|
|
| 1 |
import os, subprocess, time, pytz
|
| 2 |
+
from datetime import datetime, timedelta, timezone
|
| 3 |
from fastapi import FastAPI
|
| 4 |
|
| 5 |
from langchain_community.vectorstores import Chroma
|
|
|
|
| 70 |
def search_text(query):
|
| 71 |
"""Searches for similar texts."""
|
| 72 |
|
| 73 |
+
now_utc = datetime.now(timezone.utc)
|
| 74 |
+
now = now_utc + timedelta(hours=7)
|
| 75 |
+
print(now.strftime('%Y-%m-%d %H:%M:%S +07'))
|
| 76 |
print(f"Searching for: {query}")
|
| 77 |
|
| 78 |
start = time.time()
|