tykiww commited on
Commit
82dcd78
1 Parent(s): 0a667af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -45,6 +45,7 @@ def retrieve_answer(question, goals, session_key):
45
  return f, c
46
 
47
  def return_stored_transcripts(conf):
 
48
  store = conf["layout"]["stored_meetings"]
49
  meeting_paths = os.listdir(store)
50
  combined_paths = [store + i for i in meeting_paths]
@@ -59,14 +60,12 @@ def return_stored_transcripts(conf):
59
 
60
  def namespace_check(arg):
61
  """This piece of code should be moved to the backend QA Service"""
 
62
  pc = pc_connector._connection()
63
  index = pc.Index(conf["embeddings"]["index_name"])
64
  stats = index.describe_index_stats()
65
  name_list = stats['namespaces'].keys()
66
  name_list = [item for item in name_list if item != '']
67
- print(arg)
68
- print(name_list)
69
- print(arg in name_list)
70
  return arg in name_list
71
 
72
 
@@ -84,6 +83,7 @@ def drop_namespace(arg):
84
 
85
 
86
  def generate_key():
 
87
  unique_key = str(uuid.uuid1())
88
  unique_key = 'User_' + unique_key
89
  timer = threading.Timer(conf["session"]["user_timeout"], drop_namespace, [unique_key])
 
45
  return f, c
46
 
47
  def return_stored_transcripts(conf):
48
+ print("Returning stored transcript")
49
  store = conf["layout"]["stored_meetings"]
50
  meeting_paths = os.listdir(store)
51
  combined_paths = [store + i for i in meeting_paths]
 
60
 
61
  def namespace_check(arg):
62
  """This piece of code should be moved to the backend QA Service"""
63
+ print("Checking namespace")
64
  pc = pc_connector._connection()
65
  index = pc.Index(conf["embeddings"]["index_name"])
66
  stats = index.describe_index_stats()
67
  name_list = stats['namespaces'].keys()
68
  name_list = [item for item in name_list if item != '']
 
 
 
69
  return arg in name_list
70
 
71
 
 
83
 
84
 
85
  def generate_key():
86
+ print("Generating key")
87
  unique_key = str(uuid.uuid1())
88
  unique_key = 'User_' + unique_key
89
  timer = threading.Timer(conf["session"]["user_timeout"], drop_namespace, [unique_key])