karubiniumu commited on
Commit
b99fbc5
1 Parent(s): 5eaa60e
Files changed (2) hide show
  1. app.py +3 -1
  2. requirements.txt +2 -1
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import gradio as gr
 
2
 
3
  sentense_transformers_model = "sentence-transformers/paraphrase-multilingual-mpnet-base-v2"
4
  ranker_model = 'hotchpotch/japanese-reranker-cross-encoder-base-v1'
@@ -91,7 +92,8 @@ class Niwa_rag :
91
 
92
  self.pipe = pipe
93
  def run(self,q):
94
- print('q:',q)
 
95
  if not q :
96
  return {'reply':'','sources':''}
97
  result = self.pipe.run({
 
1
  import gradio as gr
2
+ import pytz
3
 
4
  sentense_transformers_model = "sentence-transformers/paraphrase-multilingual-mpnet-base-v2"
5
  ranker_model = 'hotchpotch/japanese-reranker-cross-encoder-base-v1'
 
92
 
93
  self.pipe = pipe
94
  def run(self,q):
95
+ now = datetime.datetime.now(pytz.timezone('Asia/Tokyo'))
96
+ print('q:',q,now)
97
  if not q :
98
  return {'reply':'','sources':''}
99
  result = self.pipe.run({
requirements.txt CHANGED
@@ -6,4 +6,5 @@ google-ai-haystack
6
  accelerate
7
  sentence-transformers
8
  fugashi
9
- unidic-lite
 
 
6
  accelerate
7
  sentence-transformers
8
  fugashi
9
+ unidic-lite
10
+ pytz