star-nox commited on
Commit
b8c8c86
1 Parent(s): 4a141f2

added dotenv to requirements

Browse files
__pycache__/retrieval.cpython-310.pyc CHANGED
Binary files a/__pycache__/retrieval.cpython-310.pyc and b/__pycache__/retrieval.cpython-310.pyc differ
 
app.py CHANGED
@@ -118,7 +118,9 @@ def predict(
118
  ta._load_pinecone_vectorstore()
119
  question = inputs
120
  top_context_list = ta.retrieve_contexts_from_pinecone(user_question=question, topk=NUM_ANSWERS_GENERATED)
121
- print(top_context_list)
 
 
122
 
123
  def reset_textbox():
124
  return gr.update(value="")
 
118
  ta._load_pinecone_vectorstore()
119
  question = inputs
120
  top_context_list = ta.retrieve_contexts_from_pinecone(user_question=question, topk=NUM_ANSWERS_GENERATED)
121
+ print(len(top_context_list))
122
+
123
+
124
 
125
  def reset_textbox():
126
  return gr.update(value="")
requirements.txt CHANGED
@@ -3,4 +3,5 @@ gradio==3.20.1
3
  pinecone-client
4
  sentence-transformers
5
  pandas
6
- langchain
 
 
3
  pinecone-client
4
  sentence-transformers
5
  pandas
6
+ langchain
7
+ python-dotenv
retrieval.py CHANGED
@@ -15,6 +15,7 @@ from dotenv import load_dotenv
15
  from PIL import Image
16
  from transformers import (AutoModelForSequenceClassification, AutoTokenizer, GPT2Tokenizer, OPTForCausalLM, T5ForConditionalGeneration)
17
 
 
18
  class Retrieval:
19
  def __init__(self,
20
  device='cuda',
 
15
  from PIL import Image
16
  from transformers import (AutoModelForSequenceClassification, AutoTokenizer, GPT2Tokenizer, OPTForCausalLM, T5ForConditionalGeneration)
17
 
18
+
19
  class Retrieval:
20
  def __init__(self,
21
  device='cuda',