CreatorPhan commited on
Commit
85ab98d
1 Parent(s): 5ea4a74

Update agent_t5.py

Browse files
Files changed (1) hide show
  1. agent_t5.py +5 -0
agent_t5.py CHANGED
@@ -9,6 +9,7 @@ from langchain.document_loaders import PyPDFLoader
9
 
10
  from transformers import AutoTokenizer, T5ForConditionalGeneration
11
  from retrieval.retrieval import Retrieval, BM25
 
12
  import os, time, torch
13
  from torch.nn import Softmax
14
  import requests
@@ -57,6 +58,10 @@ class Agent:
57
  return self.API_call(prompt)
58
 
59
  def asking(self, question):
 
 
 
 
60
  s_query = time.time()
61
  if self.use_context:
62
  print("Answering with your context:", question)
 
9
 
10
  from transformers import AutoTokenizer, T5ForConditionalGeneration
11
  from retrieval.retrieval import Retrieval, BM25
12
+ from datetime import datetime
13
  import os, time, torch
14
  from torch.nn import Softmax
15
  import requests
 
58
  return self.API_call(prompt)
59
 
60
  def asking(self, question):
61
+ timestamp = datetime.now()
62
+ timestamp = timestamp.strftime("[%Y-%m-%d %H:%M:%S]")
63
+ print(timestamp, end=' ')
64
+
65
  s_query = time.time()
66
  if self.use_context:
67
  print("Answering with your context:", question)